smartinezbragado commited on
Commit
af18bd5
1 Parent(s): 5706ede

Update views.py

Browse files
Files changed (1) hide show
  1. views.py +4 -5
views.py CHANGED
@@ -50,14 +50,13 @@ def home():
50
  docs_df = topic_model.get_document_info(subreddits_df.Text)
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 redirect(url_for('views.success', topics = topics_df.to_html(index=False), docs = docs_df.to_html(index=False)))
54
-
55
 
56
  return render_template('index.html')
57
 
58
- @views.route('/succes/<topics>/<docs>', methods=['GET'])
59
- def success(topics, docs):
60
- return render_template('success.html', topics = topics, docs = docs)
61
 
62
  @views.route('/error/<type_of_error>', methods=['GET'])
63
  def error(type_of_error: str):
 
50
  docs_df = topic_model.get_document_info(subreddits_df.Text)
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', topics = topics_df.to_html(index=False), docs = docs_df.to_html(index=False))
 
54
 
55
  return render_template('index.html')
56
 
57
+ @views.route('/succes', methods=['GET'])
58
+ def success():
59
+ return render_template('success.html')
60
 
61
  @views.route('/error/<type_of_error>', methods=['GET'])
62
  def error(type_of_error: str):