GhoulMac commited on
Commit
f336e23
1 Parent(s): 487bbbc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -20,7 +20,10 @@ def pred_ener(date):
20
  def pred_boiler(date):
21
  preds=Generate.inference_boiler(date,example_df_boiler)
22
  return preds
23
-
 
 
 
24
  with demo:
25
  gr.Markdown("Tool for predicting the next seven days of data in the future using the last 200 points of data incoming")
26
  with gr.Tabs():
@@ -53,7 +56,12 @@ with demo:
53
  with gr.Column():
54
  Boiler_output_btn=gr.Button("Forecast")
55
  boiler_plot_forecast=gr.Button("Plot")
56
- boil_plots=gr.Plot()
 
 
 
 
 
57
 
58
  def plotg_air(dataframe):
59
  fig=px.line(dataframe,x='timestamp',y=dataframe.columns,
 
20
  def pred_boiler(date):
21
  preds=Generate.inference_boiler(date,example_df_boiler)
22
  return preds
23
+
24
+ def upload_file(files):
25
+ file_paths = [file.name for file in files]
26
+ return file_paths
27
  with demo:
28
  gr.Markdown("Tool for predicting the next seven days of data in the future using the last 200 points of data incoming")
29
  with gr.Tabs():
 
56
  with gr.Column():
57
  Boiler_output_btn=gr.Button("Forecast")
58
  boiler_plot_forecast=gr.Button("Plot")
59
+ boil_plots=gr.Plot
60
+
61
+ with gr.TabItem("Upload data"):
62
+ file_output = gr.File()
63
+ upload_button = gr.UploadButton("Click to Upload a File", file_types=["csv"], file_count="multiple",show_progress=True)
64
+ upload_button.upload(upload_file, upload_button, file_output)
65
 
66
  def plotg_air(dataframe):
67
  fig=px.line(dataframe,x='timestamp',y=dataframe.columns,