AbdullahImran commited on
Commit
8d69ddf
Β·
verified Β·
1 Parent(s): 3a5b4c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -72,16 +72,18 @@ with demo:
72
  with gr.Tab("🏦 Bankruptcy Classifier"):
73
  gr.Markdown("**Upload company features** (as DataFrame) to predict bankruptcy:")
74
  inp1 = gr.Dataframe(type="pandas", label="Features DataFrame")
 
75
  out1 = gr.Label(label="Predicted Label")
76
  plt1 = gr.Plot()
77
- inp1.submit(classify_fn, inp1, [out1, plt1])
78
 
79
  with gr.Tab("πŸ“ˆ Anomaly Regression"):
80
  gr.Markdown("**Upload company features** (as DataFrame) to predict anomaly score:")
81
  inp2 = gr.Dataframe(type="pandas", label="Features DataFrame")
 
82
  out2 = gr.Textbox(label="Predicted Scores List")
83
  plt2 = gr.Plot()
84
- inp2.submit(regress_fn, inp2, [out2, plt2])
85
 
86
  with gr.Tab("πŸ“Š LSTM Revenue Forecast"):
87
  gr.Markdown("**Enter last 10 quarterly revenues** (comma-separated) to forecast Q10 revenue:")
 
72
  with gr.Tab("🏦 Bankruptcy Classifier"):
73
  gr.Markdown("**Upload company features** (as DataFrame) to predict bankruptcy:")
74
  inp1 = gr.Dataframe(type="pandas", label="Features DataFrame")
75
+ classify_btn = gr.Button("Run Classification")
76
  out1 = gr.Label(label="Predicted Label")
77
  plt1 = gr.Plot()
78
+ classify_btn.click(fn=classify_fn, inputs=inp1, outputs=[out1, plt1])])
79
 
80
  with gr.Tab("πŸ“ˆ Anomaly Regression"):
81
  gr.Markdown("**Upload company features** (as DataFrame) to predict anomaly score:")
82
  inp2 = gr.Dataframe(type="pandas", label="Features DataFrame")
83
+ regress_btn = gr.Button("Run Regression")
84
  out2 = gr.Textbox(label="Predicted Scores List")
85
  plt2 = gr.Plot()
86
+ regress_btn.click(fn=regress_fn, inputs=inp2, outputs=[out2, plt2])])
87
 
88
  with gr.Tab("πŸ“Š LSTM Revenue Forecast"):
89
  gr.Markdown("**Enter last 10 quarterly revenues** (comma-separated) to forecast Q10 revenue:")