clementBE commited on
Commit
d3db3d3
·
verified ·
1 Parent(s): 94e6de7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -99,8 +99,9 @@ def export_predictions():
99
  global df_predict_results
100
  if df_predict_results is None:
101
  return None
102
- # Save to Excel in-memory and send as downloadable file
103
- return df_predict_results
 
104
 
105
  with gr.Blocks() as demo:
106
  gr.Markdown("# 🧠 Text Classification App")
 
99
  global df_predict_results
100
  if df_predict_results is None:
101
  return None
102
+ export_path = "/mnt/data/predictions_output.xlsx" # Gradio environment allows writing here
103
+ df_predict_results.to_excel(export_path, index=False)
104
+ return export_path
105
 
106
  with gr.Blocks() as demo:
107
  gr.Markdown("# 🧠 Text Classification App")