yabramuvdi commited on
Commit
f932e67
·
1 Parent(s): 9cff372

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -20,18 +20,16 @@ classifier = TextClassificationPipeline(model=model,
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
  description = "This page lets users test the __Work-from-Home Algorithmic Measurement (WHAM)__ model used in the paper _“Remote Work across Jobs, Companies and Countries” (Hansen, Lambert, Bloom, Davis, Sadun & Taska, 2022)_. It is maintained by Yabra Muvdi, who works as a pre-doctoral researcher for Professor Hansen. Yabra was instrumental in developing WHAM. \n\n The application allows users to input any arbitrary text and computes the predicted probability of the text exhibiting the possibility of remote work. Users can also flag any examples that are incorrectly classified by the model. This is simply done by clicking on the _“Flag”_ button and then selecting _“mistake”_."
26
 
27
  article = "Test" # text at the end of the app
28
- examples = [
29
  ["We are looking for a Deputy Home Manager with domiciliary care experience to join our company. You will work from home care facilities with a strong track record of quality service.", 0.5],
30
  ["We are open to discussing flexible working arrangements and encourage our people to explore new ways of working - including part-time, job-share or \textbf{working from different locations}. Everyone can ask about it.", 0.5],
31
  ["We see the value in work-life balance, many of us take full advantage of our flexible working arrangements, so whether you like to get a surf in before work, like to head home in time to pick up the kids or you just like working from the comfort of your own home now and then, we want to support you.", 0.5],
32
  ["The ideal candidate is comfortable in working in remote northern Alberta in the town Peace River, High Level and Fairview.", 0.5],
33
  ["With a hybrid mix of time at home as well as our corporate office, this role will suit an analytical, process orientated and people focused payroll professional who thrives in a fast-paced environment.", 0.5]
34
- ]
35
 
36
  #%%
37
 
@@ -62,7 +60,7 @@ app = gr.Interface(fn=[predict_wfh],
62
  title=title,
63
  description=description,
64
  article=article,
65
- examples=examples,
66
  allow_flagging="manual",
67
  flagging_options=["mistake"],
68
  flagging_callback=hf_saver
 
20
 
21
  # basic elements of page
22
  title = "Remote Work Detection Application"
 
 
23
  description = "This page lets users test the __Work-from-Home Algorithmic Measurement (WHAM)__ model used in the paper _“Remote Work across Jobs, Companies and Countries” (Hansen, Lambert, Bloom, Davis, Sadun & Taska, 2022)_. It is maintained by Yabra Muvdi, who works as a pre-doctoral researcher for Professor Hansen. Yabra was instrumental in developing WHAM. \n\n The application allows users to input any arbitrary text and computes the predicted probability of the text exhibiting the possibility of remote work. Users can also flag any examples that are incorrectly classified by the model. This is simply done by clicking on the _“Flag”_ button and then selecting _“mistake”_."
24
 
25
  article = "Test" # text at the end of the app
26
+ #examples = [
27
  ["We are looking for a Deputy Home Manager with domiciliary care experience to join our company. You will work from home care facilities with a strong track record of quality service.", 0.5],
28
  ["We are open to discussing flexible working arrangements and encourage our people to explore new ways of working - including part-time, job-share or \textbf{working from different locations}. Everyone can ask about it.", 0.5],
29
  ["We see the value in work-life balance, many of us take full advantage of our flexible working arrangements, so whether you like to get a surf in before work, like to head home in time to pick up the kids or you just like working from the comfort of your own home now and then, we want to support you.", 0.5],
30
  ["The ideal candidate is comfortable in working in remote northern Alberta in the town Peace River, High Level and Fairview.", 0.5],
31
  ["With a hybrid mix of time at home as well as our corporate office, this role will suit an analytical, process orientated and people focused payroll professional who thrives in a fast-paced environment.", 0.5]
32
+ ]
33
 
34
  #%%
35
 
 
60
  title=title,
61
  description=description,
62
  article=article,
63
+ #examples=examples,
64
  allow_flagging="manual",
65
  flagging_options=["mistake"],
66
  flagging_callback=hf_saver