yabramuvdi commited on
Commit
8a7d133
1 Parent(s): 64cb22e

Update to new version of gradio

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -51,11 +51,11 @@ def predict_wfh(input_text, input_slider):
51
  return({"Not work from home": no_wfh, "Work from home": wfh}, f"Probability of WFH: {np.round(prob_wfh, 3)}")
52
 
53
 
54
- label = gr.outputs.Label(num_top_classes=1, type="confidences", label="Binary classification")
55
- text_output = gr.outputs.Textbox(label="Predicted probability")
56
 
57
  app = gr.Interface(fn=predict_wfh,
58
- inputs=[gr.inputs.Textbox(lines=10, label="Input text"), gr.inputs.Slider(0, 1, 0.001, label="Classification threshold", default=0.5)],
59
  outputs=[label, text_output],
60
  theme="huggingface",
61
  title=title,
 
51
  return({"Not work from home": no_wfh, "Work from home": wfh}, f"Probability of WFH: {np.round(prob_wfh, 3)}")
52
 
53
 
54
+ label = gr.Label(num_top_classes=1, type="confidences", label="Binary classification")
55
+ text_output = gr.Textbox(label="Predicted probability")
56
 
57
  app = gr.Interface(fn=predict_wfh,
58
+ inputs=[gr.Textbox(lines=10, label="Input text"), gr.Slider(0, 1, 0.001, label="Classification threshold", default=0.5)],
59
  outputs=[label, text_output],
60
  theme="huggingface",
61
  title=title,