anujkum0x commited on
Commit
c9a20e0
·
verified ·
1 Parent(s): f49625f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -209,7 +209,7 @@ def full_forecast_pipeline(file_obj, forecast_horizon, finetune_steps, freq, sta
209
  tmpfile.write(csv_data)
210
  csv_path = tmpfile.name
211
 
212
- return processed_data.to_html(index=False), plot, csv_path, None
213
 
214
  except ValueError as e:
215
  return f"Error: {e}", None, None, None
@@ -239,7 +239,7 @@ def create_interface():
239
 
240
  resample_freq_dropdown = gr.Dropdown(choices=['15min', '30min', 'H', '2H', '3H', '4H', '5H', '6H', '12H', 'D', 'W', 'M', 'Y'], label="Resample Frequency", value='D')
241
 
242
- output_html = gr.HTML(label="Forecast Data")
243
  output_plot = gr.Plot(label="Time Series Plot")
244
  download_button = gr.File(label="Download Forecast Data as CSV")
245
  error_output = gr.Markdown(label="Error Messages")
@@ -249,7 +249,7 @@ def create_interface():
249
  btn.click(
250
  fn=full_forecast_pipeline,
251
  inputs=[file_input, forecast_horizon_input, finetune_steps_input, freq_dropdown, start_date_input, end_date_input, start_time_input, end_time_input, resample_freq_dropdown],
252
- outputs=[output_html, output_plot, download_button, error_output]
253
  )
254
  return iface
255
 
 
209
  tmpfile.write(csv_data)
210
  csv_path = tmpfile.name
211
 
212
+ return csv_data, plot, csv_path, None
213
 
214
  except ValueError as e:
215
  return f"Error: {e}", None, None, None
 
239
 
240
  resample_freq_dropdown = gr.Dropdown(choices=['15min', '30min', 'H', '2H', '3H', '4H', '5H', '6H', '12H', 'D', 'W', 'M', 'Y'], label="Resample Frequency", value='D')
241
 
242
+ output_csv = gr.Textbox(label="Forecast Data (CSV)")
243
  output_plot = gr.Plot(label="Time Series Plot")
244
  download_button = gr.File(label="Download Forecast Data as CSV")
245
  error_output = gr.Markdown(label="Error Messages")
 
249
  btn.click(
250
  fn=full_forecast_pipeline,
251
  inputs=[file_input, forecast_horizon_input, finetune_steps_input, freq_dropdown, start_date_input, end_date_input, start_time_input, end_time_input, resample_freq_dropdown],
252
+ outputs=[output_csv, output_plot, download_button, error_output]
253
  )
254
  return iface
255