bndl commited on
Commit
87abc68
·
1 Parent(s): 413f5b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -172,7 +172,7 @@ def train_model(x, target_cols):
172
  metrics = pd.DataFrame([[0.05, 0.017]], columns=["RMSE", "MAPE"])
173
  next_df = x.sample(n=5, random_state=12)
174
  next_df.drop(columns=target_cols, inplace=True)
175
- return "Model successfully adapted to your data!", performance_plot, metrics, next_df
176
 
177
 
178
 
@@ -229,9 +229,9 @@ with gr.Blocks(css=css_styling, title=page_title, theme=osium_theme) as demo:
229
 
230
  with gr.Column():
231
  gr.Markdown("### Your model adaptation")
232
- output_text = gr.Textbox(label="Training results")
233
  output_plot = gr.Image(label="Training performance", elem_classes="output-image")
234
- output_performance = gr.DataFrame(label="Model performance")
235
  output_next_experiments = gr.DataFrame(label="Suggested experiments to improve performance")
236
 
237
  with gr.Tab(label="Run your model"):
@@ -396,7 +396,7 @@ with gr.Blocks(css=css_styling, title=page_title, theme=osium_theme) as demo:
396
  train_button.click(
397
  fn=train_model,
398
  inputs=[input_csv, target_columns],
399
- outputs=[output_text, output_plot, output_performance, output_next_experiments],
400
  show_progress=True,
401
  )
402
 
 
172
  metrics = pd.DataFrame([[0.05, 0.017]], columns=["RMSE", "MAPE"])
173
  next_df = x.sample(n=5, random_state=12)
174
  next_df.drop(columns=target_cols, inplace=True)
175
+ return "0.017", performance_plot, next_df
176
 
177
 
178
 
 
229
 
230
  with gr.Column():
231
  gr.Markdown("### Your model adaptation")
232
+ output_text = gr.Textbox(label="Training results - Mean Average Percentage Error")
233
  output_plot = gr.Image(label="Training performance", elem_classes="output-image")
234
+ # output_performance = gr.DataFrame(label="Model performance")
235
  output_next_experiments = gr.DataFrame(label="Suggested experiments to improve performance")
236
 
237
  with gr.Tab(label="Run your model"):
 
396
  train_button.click(
397
  fn=train_model,
398
  inputs=[input_csv, target_columns],
399
+ outputs=[output_text, output_plot, output_next_experiments],
400
  show_progress=True,
401
  )
402