Nuzz23 commited on
Commit
33770c1
·
1 Parent(s): af84893

fixed typos

Browse files
Files changed (1) hide show
  1. app.py +27 -30
app.py CHANGED
@@ -24,8 +24,6 @@ def dataProcessing(file, timestamp_column:str=None):
24
 
25
  fig = plotResults(df, target_cols)
26
 
27
- raise Exception("Pizza alla Nutella.")
28
-
29
  df.to_csv(OUT_PATH, index=False)
30
 
31
  if fig is not None:
@@ -96,35 +94,34 @@ with gr.Blocks(title="Time series anomaly detection with Chronos2") as demo:
96
  download_output = gr.File(label="Download Anomaly Detection Results (CSV)", visible=False, interactive=False)
97
  errorHandler = gr.Markdown(label="Error Messages", visible=False)
98
 
 
 
 
 
 
 
 
 
 
 
 
 
99
 
100
- processing_msg = gr.Markdown("⏳ Processing file, please wait...", visible=False)
101
- detect_button.click(
102
- lambda : gr.update(visible=False, value=""),
103
- inputs=None,
104
- outputs=[plot_output, download_output, errorHandler]
105
- )
106
-
107
- detect_button.click(
108
- lambda : gr.update(visible=True),
109
- inputs=None,
110
- outputs=processing_msg
111
- )
112
-
113
- detect_button.click(
114
- lambda file, timestamp_question, timestamp_column:
115
- dataProcessing(
116
- file.name if file is not None else None,
117
- timestamp_column if timestamp_question == "Yes" else None
118
- ),
119
- inputs=[file_input, timestamp_question, timestamp_column_input],
120
- outputs=[plot_output, download_output, errorHandler]
121
- )
122
-
123
- detect_button.click(
124
- lambda : gr.update(visible=False),
125
- inputs=None,
126
- outputs=processing_msg
127
- )
128
 
129
 
130
  demo.launch(share=True)
 
24
 
25
  fig = plotResults(df, target_cols)
26
 
 
 
27
  df.to_csv(OUT_PATH, index=False)
28
 
29
  if fig is not None:
 
94
  download_output = gr.File(label="Download Anomaly Detection Results (CSV)", visible=False, interactive=False)
95
  errorHandler = gr.Markdown(label="Error Messages", visible=False)
96
 
97
+ processing_msg = gr.Markdown("⏳ Processing file, please wait...", visible=False)
98
+ detect_button.click(
99
+ lambda : gr.update(visible=False, value=""),
100
+ inputs=None,
101
+ outputs=[plot_output, download_output, errorHandler]
102
+ )
103
+
104
+ detect_button.click(
105
+ lambda : gr.update(visible=True),
106
+ inputs=None,
107
+ outputs=processing_msg
108
+ )
109
 
110
+ detect_button.click(
111
+ lambda file, timestamp_question, timestamp_column:
112
+ dataProcessing(
113
+ file.name if file is not None else None,
114
+ timestamp_column if timestamp_question == "Yes" else None
115
+ ),
116
+ inputs=[file_input, timestamp_question, timestamp_column_input],
117
+ outputs=[plot_output, download_output, errorHandler]
118
+ )
119
+
120
+ detect_button.click(
121
+ lambda : gr.update(visible=False),
122
+ inputs=None,
123
+ outputs=processing_msg
124
+ )
 
 
 
 
 
 
 
 
 
 
 
 
 
125
 
126
 
127
  demo.launch(share=True)