yabramuvdi commited on
Commit
f229ea0
·
1 Parent(s): 78e787b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
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 From Home Predictor"
23
- description = "Demo application that predicts the pressence of work from home in any given sequence of text."
24
- article = "" # text at the end of the app
 
25
  examples = [
26
- ["This is a work from home position.", 0.9],
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.998)],
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,