Spaces:
Runtime error
Runtime error
modify app
Browse files
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 |
-
#
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|