ManishThota commited on
Commit
c08d82e
1 Parent(s): f1d9d55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -194,8 +194,8 @@ def gradio_predict(video,image, question):
194
 
195
  def export_csv(d):
196
  df = pd.DataFrame([d])
197
- df.to_csv("output.csv", sep = ',')
198
- return gr.File(value="output.csv", visible=True)
199
 
200
  css = """
201
  #container{
@@ -231,7 +231,7 @@ with gr.Blocks(css = css) as app:
231
  with gr.Column():
232
  answer = gr.TextArea(label="Answer")
233
  save_btn = gr.Button("Save as CSV")
234
- csv = gr.File(interactive = False, visible=False)
235
 
236
  # Make sure the inputs and outputs match in your click function
237
 
@@ -240,7 +240,7 @@ with gr.Blocks(css = css) as app:
240
 
241
  # Button to save the answer as CSV
242
  save_btn.click(export_csv, answer, csv)
243
-
244
 
245
  gr.Examples(
246
  examples=test_examples,
 
194
 
195
  def export_csv(d):
196
  df = pd.DataFrame([d])
197
+ df.to_excel("output.xlsx", sep = ',')
198
+ return gr.File(value="output.xlsx", visible=True)
199
 
200
  css = """
201
  #container{
 
231
  with gr.Column():
232
  answer = gr.TextArea(label="Answer")
233
  save_btn = gr.Button("Save as CSV")
234
+ csv = gr.File(interactive=False, visible=False)
235
 
236
  # Make sure the inputs and outputs match in your click function
237
 
 
240
 
241
  # Button to save the answer as CSV
242
  save_btn.click(export_csv, answer, csv)
243
+ c
244
 
245
  gr.Examples(
246
  examples=test_examples,