smartinezbragado commited on
Commit
62cdbdb
1 Parent(s): 2c1c0b4

Update views.py

Browse files
Files changed (1) hide show
  1. views.py +2 -2
views.py CHANGED
@@ -45,11 +45,11 @@ def home():
45
  # Donwload topics
46
  # topics_df.to_csv(os.path.join(DOWNLOADS_PATH, 'topics.csv'), index=False)
47
  topics_df.to_csv('topics.csv', index=False)
48
- send_from_directory('topics.csv', as_attachment=True)
49
  # Download docs info
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_from_directory('docs_with_topics_info.csv', as_attachment=True)
53
  return redirect(url_for('views.success'))
54
 
55
  return render_template('index.html')
 
45
  # Donwload topics
46
  # topics_df.to_csv(os.path.join(DOWNLOADS_PATH, 'topics.csv'), index=False)
47
  topics_df.to_csv('topics.csv', index=False)
48
+ send_file('topics.csv', as_attachment=True)
49
  # Download docs info
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'))
54
 
55
  return render_template('index.html')