Zhiming666 commited on
Commit
423ca9c
1 Parent(s): 7b27482

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -58,7 +58,7 @@ def get_arxiv_data(search_query, number):
58
  # Save search query, results, and current time to Excel file
59
  current_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
60
  df = pd.DataFrame({'Search Query': [search_query], 'Results': ['\n'.join(results)], 'Timestamp': [current_time]})
61
- folder_path = 'data'
62
  os.makedirs(folder_path, exist_ok=True)
63
  excel_filepath = os.path.join(folder_path, 'information.xlsx')
64
  if os.path.exists(excel_filepath):
@@ -83,6 +83,6 @@ output_text = gr.outputs.Textbox(label="Results")
83
  output_time = gr.outputs.Textbox(label="Elapsed Time")
84
 
85
  title = "ArXiv Search"
86
- description = "Crawling Papers on Arxiv"
87
 
88
  gr.Interface(fn=search_arxiv, inputs=[search_query_input, max_results_input], outputs=[output_text, output_time], title=title, description=description).launch()
 
58
  # Save search query, results, and current time to Excel file
59
  current_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
60
  df = pd.DataFrame({'Search Query': [search_query], 'Results': ['\n'.join(results)], 'Timestamp': [current_time]})
61
+ folder_path = os.path.join(os.path.dirname(__file__), 'data')
62
  os.makedirs(folder_path, exist_ok=True)
63
  excel_filepath = os.path.join(folder_path, 'information.xlsx')
64
  if os.path.exists(excel_filepath):
 
83
  output_time = gr.outputs.Textbox(label="Elapsed Time")
84
 
85
  title = "ArXiv Search"
86
+ description = "Search for articles on ArXiv"
87
 
88
  gr.Interface(fn=search_arxiv, inputs=[search_query_input, max_results_input], outputs=[output_text, output_time], title=title, description=description).launch()