Spaces:
Sleeping
Sleeping
Update to new version of gradio
Browse files
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.
|
55 |
-
text_output = gr.
|
56 |
|
57 |
app = gr.Interface(fn=predict_wfh,
|
58 |
-
inputs=[gr.
|
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,
|