smartinezbragado commited on
Commit
8f87748
1 Parent(s): ed27702

Update views.py

Browse files
Files changed (1) hide show
  1. views.py +2 -1
views.py CHANGED
@@ -3,6 +3,7 @@ import pandas as pd
3
  import tempfile
4
  from bertopic import BERTopic
5
  from src.reddit import RedditBot
 
6
  from flask import Blueprint, render_template, request, send_file, redirect, url_for, send_from_directory
7
 
8
  # DOWNLOADS_PATH = os.path.join(os.getcwd(), 'downloads')
@@ -51,7 +52,7 @@ def home():
51
  docs_df.to_csv('docs_with_topics_info.csv', index=False)
52
  send_file('docs_with_topics_info.csv', as_attachment=True)
53
  return render_template('success.html',
54
- topics = [topics_df.to_html(classes='data')],
55
  titles=topics_df.columns.values,
56
  docs = [docs_df.to_html(classes='data')],
57
  docs_title=docs_df.columns.values
 
3
  import tempfile
4
  from bertopic import BERTopic
5
  from src.reddit import RedditBot
6
+ from pretty_html_table import build_table
7
  from flask import Blueprint, render_template, request, send_file, redirect, url_for, send_from_directory
8
 
9
  # DOWNLOADS_PATH = os.path.join(os.getcwd(), 'downloads')
 
52
  docs_df.to_csv('docs_with_topics_info.csv', index=False)
53
  send_file('docs_with_topics_info.csv', as_attachment=True)
54
  return render_template('success.html',
55
+ topics = [build_table(topics_df, 'blue_light')],
56
  titles=topics_df.columns.values,
57
  docs = [docs_df.to_html(classes='data')],
58
  docs_title=docs_df.columns.values