Spaces:
Running
Running
Commit
·
f229ea0
1
Parent(s):
78e787b
Update app.py
Browse files
app.py
CHANGED
@@ -19,11 +19,12 @@ classifier = TextClassificationPipeline(model=model,
|
|
19 |
return_all_scores=True)
|
20 |
|
21 |
# basic elements of page
|
22 |
-
title = "Work
|
23 |
-
description = "
|
24 |
-
|
|
|
25 |
examples = [
|
26 |
-
["This is a work from home position.", 0.
|
27 |
["This position does not allow remote work.", 0.5],
|
28 |
]
|
29 |
|
@@ -50,7 +51,7 @@ label = gr.outputs.Label(num_top_classes=1, type="confidences", label="Binary cl
|
|
50 |
text_output = gr.outputs.Textbox(type="auto", label="Predicted probability")
|
51 |
|
52 |
app = gr.Interface(fn=[predict_wfh],
|
53 |
-
inputs=[gr.inputs.Textbox(lines=10, label="Input text"), gr.inputs.Slider(0, 1, 0.001, label="Classification threshold", default=0.
|
54 |
outputs=[label, text_output],
|
55 |
theme="huggingface",
|
56 |
title=title,
|
|
|
19 |
return_all_scores=True)
|
20 |
|
21 |
# basic elements of page
|
22 |
+
title = "Remote Work Detection Application"
|
23 |
+
description = "Online tool accompanying the paper *Remote Work across Jobs, Employers, and Countries∗ (Hansen et al. 2022). The application allows the user to input arbitrary text and receive a predicted probability of the text exhibiting the possibility of remote work."
|
24 |
+
|
25 |
+
article = "Some more text" # text at the end of the app
|
26 |
examples = [
|
27 |
+
["This is a work from home position.", 0.5],
|
28 |
["This position does not allow remote work.", 0.5],
|
29 |
]
|
30 |
|
|
|
51 |
text_output = gr.outputs.Textbox(type="auto", label="Predicted probability")
|
52 |
|
53 |
app = gr.Interface(fn=[predict_wfh],
|
54 |
+
inputs=[gr.inputs.Textbox(lines=10, label="Input text"), gr.inputs.Slider(0, 1, 0.001, label="Classification threshold", default=0.5)],
|
55 |
outputs=[label, text_output],
|
56 |
theme="huggingface",
|
57 |
title=title,
|