bndl commited on
Commit
844fc6d
·
1 Parent(s): f77d0fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -167,7 +167,7 @@ def train_model(x, target_cols):
167
  print(target_cols)
168
  time.sleep(6)
169
  performance_plot = cv2.imread("model_performance.png")
170
- metrics = pd.DataFrame([[0.09, 0.017]], columns=["RMSE", "Loss"])
171
  return "Model successfully adapted to your data!", performance_plot, metrics
172
 
173
 
@@ -318,7 +318,7 @@ with gr.Blocks(css=css_styling, title=page_title, theme=osium_theme) as demo:
318
 
319
  with gr.Column():
320
  gr.Markdown("### Your design space")
321
- output_plot = gr.Plot(type="plotly")
322
 
323
  with gr.Row():
324
  gr.Examples([example_inputs], [input_formula, input_phase, input_bccfcc, input_processing, input_microstructure])
@@ -326,7 +326,7 @@ with gr.Blocks(css=css_styling, title=page_title, theme=osium_theme) as demo:
326
  input_slicer_1.change(
327
  fn=update_plot_fn,
328
  inputs=[dropdown_1, input_slicer_1, dropdown_2, input_slicer_2, dropdown_3, input_slicer_3],
329
- outputs=[output_plot],
330
  show_progress=True,
331
  queue=True,
332
  every=0.5,
@@ -335,7 +335,7 @@ with gr.Blocks(css=css_styling, title=page_title, theme=osium_theme) as demo:
335
  input_slicer_2.change(
336
  fn=update_plot_fn,
337
  inputs=[dropdown_1, input_slicer_1, dropdown_2, input_slicer_2, dropdown_3, input_slicer_3],
338
- outputs=[output_plot],
339
  show_progress=True,
340
  queue=True,
341
  # every=2,
@@ -344,7 +344,7 @@ with gr.Blocks(css=css_styling, title=page_title, theme=osium_theme) as demo:
344
  input_slicer_3.change(
345
  fn=update_plot_fn,
346
  inputs=[dropdown_1, input_slicer_1, dropdown_2, input_slicer_2, dropdown_3, input_slicer_3],
347
- outputs=[output_plot],
348
  show_progress=True,
349
  queue=True,
350
  # every=2,
@@ -353,7 +353,7 @@ with gr.Blocks(css=css_styling, title=page_title, theme=osium_theme) as demo:
353
  output_hardness.change(
354
  fn=update_plot_fn,
355
  inputs=[dropdown_1, input_slicer_1, dropdown_2, input_slicer_2, dropdown_3, input_slicer_3],
356
- outputs=[output_plot],
357
  show_progress=True,
358
  queue=True,
359
  # every=2,
 
167
  print(target_cols)
168
  time.sleep(6)
169
  performance_plot = cv2.imread("model_performance.png")
170
+ metrics = pd.DataFrame([[0.05, 0.017]], columns=["RMSE", "MAPE"])
171
  return "Model successfully adapted to your data!", performance_plot, metrics
172
 
173
 
 
318
 
319
  with gr.Column():
320
  gr.Markdown("### Your design space")
321
+ output_plot_space = gr.Plot(type="plotly")
322
 
323
  with gr.Row():
324
  gr.Examples([example_inputs], [input_formula, input_phase, input_bccfcc, input_processing, input_microstructure])
 
326
  input_slicer_1.change(
327
  fn=update_plot_fn,
328
  inputs=[dropdown_1, input_slicer_1, dropdown_2, input_slicer_2, dropdown_3, input_slicer_3],
329
+ outputs=[output_plot_space],
330
  show_progress=True,
331
  queue=True,
332
  every=0.5,
 
335
  input_slicer_2.change(
336
  fn=update_plot_fn,
337
  inputs=[dropdown_1, input_slicer_1, dropdown_2, input_slicer_2, dropdown_3, input_slicer_3],
338
+ outputs=[output_plot_space],
339
  show_progress=True,
340
  queue=True,
341
  # every=2,
 
344
  input_slicer_3.change(
345
  fn=update_plot_fn,
346
  inputs=[dropdown_1, input_slicer_1, dropdown_2, input_slicer_2, dropdown_3, input_slicer_3],
347
+ outputs=[output_plot_space],
348
  show_progress=True,
349
  queue=True,
350
  # every=2,
 
353
  output_hardness.change(
354
  fn=update_plot_fn,
355
  inputs=[dropdown_1, input_slicer_1, dropdown_2, input_slicer_2, dropdown_3, input_slicer_3],
356
+ outputs=[output_plot_space],
357
  show_progress=True,
358
  queue=True,
359
  # every=2,