davidr70 commited on
Commit
26c3df6
·
1 Parent(s): bceafdb

remove csv

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -125,11 +125,11 @@ def update_source_runs(question_option, source_finder_id):
125
  df_display = df[columns_to_display] if all(col in df.columns for col in columns_to_display) else df
126
 
127
  # CSV for download
128
- csv_data = df.to_csv(index=False)
129
 
130
  result_message = f"Found {len(source_runs)} results"
131
 
132
- return df_display, result_message, csv_data
133
 
134
 
135
  # Function to update run_id dropdown when question or source_finder changes
@@ -191,11 +191,11 @@ async def main():
191
  interactive=False
192
  )
193
 
194
- download_button = gr.DownloadButton(
195
- label="Download Results as CSV",
196
- interactive=True,
197
- visible=True
198
- )
199
 
200
  with gr.Column(scale=1):
201
  # Sidebar area
@@ -216,14 +216,14 @@ async def main():
216
  update_source_runs,
217
  inputs=[question_dropdown, source_finder_dropdown],
218
  # outputs=[run_id_dropdown, results_table, result_text, download_button]
219
- outputs=[results_table, result_text, download_button]
220
  )
221
 
222
  source_finder_dropdown.change(
223
  update_source_runs,
224
  inputs=[question_dropdown, source_finder_dropdown],
225
  # outputs=[run_id_dropdown, results_table, result_text, download_button]
226
- outputs=[results_table, result_text, download_button]
227
  )
228
 
229
  # run_id_dropdown.change(
@@ -236,7 +236,7 @@ async def main():
236
  question_dropdown.change(
237
  update_source_runs,
238
  inputs=[question_dropdown, source_finder_dropdown],
239
- outputs=[results_table, result_text, download_button]
240
  )
241
 
242
  app.queue()
 
125
  df_display = df[columns_to_display] if all(col in df.columns for col in columns_to_display) else df
126
 
127
  # CSV for download
128
+ # csv_data = df.to_csv(index=False)
129
 
130
  result_message = f"Found {len(source_runs)} results"
131
 
132
+ return df_display, result_message
133
 
134
 
135
  # Function to update run_id dropdown when question or source_finder changes
 
191
  interactive=False
192
  )
193
 
194
+ # download_button = gr.DownloadButton(
195
+ # label="Download Results as CSV",
196
+ # interactive=True,
197
+ # visible=True
198
+ # )
199
 
200
  with gr.Column(scale=1):
201
  # Sidebar area
 
216
  update_source_runs,
217
  inputs=[question_dropdown, source_finder_dropdown],
218
  # outputs=[run_id_dropdown, results_table, result_text, download_button]
219
+ outputs=[results_table, result_text]
220
  )
221
 
222
  source_finder_dropdown.change(
223
  update_source_runs,
224
  inputs=[question_dropdown, source_finder_dropdown],
225
  # outputs=[run_id_dropdown, results_table, result_text, download_button]
226
+ outputs=[results_table, result_text]
227
  )
228
 
229
  # run_id_dropdown.change(
 
236
  question_dropdown.change(
237
  update_source_runs,
238
  inputs=[question_dropdown, source_finder_dropdown],
239
+ outputs=[results_table, result_text]
240
  )
241
 
242
  app.queue()