publichealthsurveillance commited on
Commit
a317c9c
1 Parent(s): 389748f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -2,7 +2,10 @@ import ktrain
2
  import gradio as gr
3
  from gradio.mix import Parallel
4
 
5
- examples = [["I only get my kids the ones I got....I've turned down many so called 'vaccines'"], ["In child protective services, further providing for definitions, for immunity from liability"], ["Lol what? Measles is a real thing. Get vaccinated"]]
 
 
 
6
 
7
  predictor_bert = ktrain.load_predictor('bert')
8
  predictor_mental = ktrain.load_predictor('mentalbert')
@@ -24,4 +27,6 @@ bert_io = gr.Interface(fn=bert, inputs="text", outputs="text")
24
  mental_io = gr.Interface(fn=mentalbert, inputs="text", outputs="text")
25
  phs_io = gr.Interface(fn=phsbert, inputs="text", outputs="text")
26
 
27
- Parallel(bert_io, mental_io, phs_io, examples=examples, title="Vaccine Sentiment Task - VS2", description="Enter vaccine-related tweets to generate sentiment from 3 models (BERT, MentalBERT, PHS-BERT). Label 0='vaccine critical', 1='neutral', 2='vaccine supportive'. The three provided examples are labelled 0,1,2 respectively. For details about VS2, refer to our paper (linked provided in https://huggingface.co/publichealthsurveillance/PHS-BERT).").launch()
 
 
 
2
  import gradio as gr
3
  from gradio.mix import Parallel
4
 
5
+ examples = [
6
+ ["I only get my kids the ones I got....I've turned down many so called 'vaccines'"],
7
+ ["In child protective services, further providing for definitions, for immunity from liability"],
8
+ ["Lol what? Measles is a real thing. Get vaccinated"]]
9
 
10
  predictor_bert = ktrain.load_predictor('bert')
11
  predictor_mental = ktrain.load_predictor('mentalbert')
 
27
  mental_io = gr.Interface(fn=mentalbert, inputs="text", outputs="text")
28
  phs_io = gr.Interface(fn=phsbert, inputs="text", outputs="text")
29
 
30
+ Parallel(bert_io, mental_io, phs_io,
31
+ examples=examples, title="Vaccine Sentiment Task - VS2",
32
+ description="Enter vaccine-related tweets to generate sentiment from 3 models (BERT, MentalBERT, PHS-BERT). Label 0='vaccine critical', 1='neutral', 2='vaccine supportive'. The three provided examples are labelled 0,1,2 respectively. For details about VS2, refer to our paper (linked provided in https://huggingface.co/publichealthsurveillance/PHS-BERT).").launch()