Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1121,6 +1121,11 @@ with ui.navset_card_tab(id="tab"):
|
|
1121 |
df = pd.read_csv('training_data_5.csv')
|
1122 |
mpl.rcParams.update(mpl.rcParamsDefault)
|
1123 |
fig = plot_loss_rates_model_scale(df,input.loss_type_scale(),input.model_type_scale())
|
|
|
|
|
|
|
|
|
|
|
1124 |
return fig
|
1125 |
# @output
|
1126 |
# @render.plot
|
|
|
1121 |
df = pd.read_csv('training_data_5.csv')
|
1122 |
mpl.rcParams.update(mpl.rcParamsDefault)
|
1123 |
fig = plot_loss_rates_model_scale(df,input.loss_type_scale(),input.model_type_scale())
|
1124 |
+
import tempfile
|
1125 |
+
fd, path = tempfile.mkstemp(suffix = '.svg')
|
1126 |
+
if fig:
|
1127 |
+
fig.savefig(path)
|
1128 |
+
return {"src": str(path), "width": "600px", "format":"svg"}
|
1129 |
return fig
|
1130 |
# @output
|
1131 |
# @render.plot
|