jhtonyKoo commited on
Commit
93382c1
·
1 Parent(s): ed871d5

modify app

Browse files
Files changed (1) hide show
  1. app.py +15 -5
app.py CHANGED
@@ -163,7 +163,6 @@ with gr.Blocks() as demo:
163
  y_title="Loss",
164
  height=300,
165
  width=600,
166
- y_lim=[None, None],
167
  )
168
  ito_log = gr.Textbox(label="ITO Log", lines=10)
169
 
@@ -188,10 +187,21 @@ with gr.Blocks() as demo:
188
  final_log = log
189
  loss_df = loss_data
190
 
191
- # # Update y_lim based on the actual min and max values
192
- # y_min = loss_df['loss'].min()
193
- # y_max = loss_df['loss'].max()
194
- # ito_loss_plot.update(y_lim=[y_min, y_max])
 
 
 
 
 
 
 
 
 
 
 
195
 
196
  return final_audio, final_params, final_log, loss_df
197
 
 
163
  y_title="Loss",
164
  height=300,
165
  width=600,
 
166
  )
167
  ito_log = gr.Textbox(label="ITO Log", lines=10)
168
 
 
187
  final_log = log
188
  loss_df = loss_data
189
 
190
+ # Calculate y_min and y_max
191
+ y_min = loss_df['loss'].min()
192
+ y_max = loss_df['loss'].max()
193
+
194
+ # Create a new plot configuration
195
+ plot_config = {
196
+ "x": "step",
197
+ "y": "loss",
198
+ "title": "ITO Loss Curve",
199
+ "x_title": "Step",
200
+ "y_title": "Loss",
201
+ "height": 300,
202
+ "width": 600,
203
+ "y_lim": [y_min, y_max],
204
+ }
205
 
206
  return final_audio, final_params, final_log, loss_df
207