Chan Lee commited on
Commit
01c499a
1 Parent(s): 5240935
Files changed (1) hide show
  1. app.py +11 -12
app.py CHANGED
@@ -6,14 +6,14 @@ vs_examples = [
6
  ["In child protective services, further providing for definitions, for immunity from liability"],
7
  ["Lol what? Measles is a real thing. Get vaccinated"]]
8
  vs_title = "Vaccine Sentiment Task"
9
- vs_desc = "Enter vaccine-related tweets to generate labels from 3 models (BERT, MentalBERT, PHS-BERT). Label 0='vaccine critical', 1='neutral', 2='vaccine supportive'. The three provided examples have true labels 0,1,2 respectively. For more details, please refer to the VS2 dataset description in our paper (link provided in the corresponding Hugging Face repository)."
10
 
11
  hm_examples = [
12
  ["Serious as a heart attack question/thought Riddle me this. Why, oh why, does cold brew coffee get warm after sitting to long. Taste terrible. And Hot coffee get literally COLD after sitting too long. Tastes terrible. Like what. Why don't cold stay cold and hot only get warm?"],
13
- ["It's odd how humans are considered predators when they have a heart attack and run like mad when a small insect is running straight towards them."],
14
  ["The older we get the less likely we are to view a sudden massive heart attack as a tragedy than a stroke of good luck."]]
15
  hm_title = "Health Mention Task"
16
- hm_desc = "Enter health-related tweets to generate labels from 3 models (BERT, MentalBERT, PHS-BERT). Label 0='Figurative Mentions', 1='Non-Health Mentions', 2='Health mentions'. The three provided examples have true labels 0,1,2 respectively. For more details, please refer to the RHMD dataset description in our paper (link provided in the corresponding Hugging Face repository)."
17
 
18
  dep_examples = [
19
  ["Nothing major, some underage drinking, a little pot, but I wasn't a bad kid. Furthermore, I feel like I matured well and have gone on to be successful for my age (24) IMO. I've also had positive experiences with police. The resource officer at my high school was a really good guy and almost like a mentor to me. When I was 17 I was arrested when police raided a friends house because they were tipped off that there was to be some under-aged drinking. Furthermore, I told him before we got really serious that I have anxiety and depression, and if he can’t handle that then I’ll understand if we end things. But *he* chose to stay with me and help me if I wanted it. Honestly I’m just tired of defending myself to him after this fight. I shouldn’t have to. And he kept threatening to break up; then why don’t you do it?"],
@@ -21,15 +21,15 @@ dep_examples = [
21
  ["i have horrible vivid nightmares every night. sometimes they're trauma related, but most of the time they're about murder, torture and such depraved things that I can't talk about to anyone. every morning i wake up drenched in sweat, and sometimes vomiting. i have no idea what to do. it's ruining my life."]
22
  ]
23
  dep_title = "Depression Task"
24
- dep_desc = "Enter X to generate labels from 3 models (BERT, MentalBERT, PHS-BERT). Label 0='x', 1='y', 2='z'. The three provided examples have true labels 0,1,2 respectively. For more details, please refer to the X dataset description in our paper (link provided in the corresponding Hugging Face repository)."
25
 
26
  covid_examples = [
27
  ["Second person-to-person coronavirus transmission reported in US, CDC says #FoxNews - I thought you fixed it?"],
28
- ["Do you expect a travel ban to work? #aircraft #airplane #airplanes #airport #Airports #avgeek #aviation #aviationdaily #aviationgeek #aviationlife #aviationlovers #AvSec #crewlife #Cybersecurity #flight #Flyer #flying #infosec #pilot #pilotlife #travel"],
29
  ["The latest Boarding Pass! #budget2020 #coronavirus"]
30
  ]
31
  covid_title = "COVID Related Task"
32
- covid_desc = "Enter covid-related tweets to generate labels from 3 models (BERT, MentalBERT, PHS-BERT). Label 0='news', 1='personal narrative'. The three provided examples have true labels 0,1,1 respectively. For more details, please refer to the Covid category dataset description in our paper (link provided in the corresponding Hugging Face repository)."
33
 
34
  # 2nd example looks like the most risk
35
  suicide_examples = [
@@ -38,23 +38,22 @@ suicide_examples = [
38
  ["Friendships are complicated. Close friendships between three people are even more complicated. Maybe its time to expand your circle of friends. Theres no need to get rid of the two friends youre talking about. Maybe theyll come around and maybe they wont. Either way, theres nothing wrong with meeting new people.Try to keep in mind that a lot of the people at your school (if not all of them) are thinking the EXACT same things as you. 'Nobody likes me. I wish I had more friends.' If you were to make a point of chatting with a few new people every day, theyd probably be extremely grateful to you, and might end up being good friends of yours. What kind of activities are you involved in?It sounds Hyperactive behavior you Irritable Mood a lot to your mom, and you must care about her too if youre considering her feelings (not all teenagers would have the selflessness and empathy to do that). Maybe youd feel better if you talked to her about some of this. Is it possible to have dinner together tonight? Maybe you could plan some kind of event with her, Hyperactive behavior a movie or a manicure. Also, you could offer to run errands with her some evening or on the weekend. She might appreciate the company and Ive found it makes great visiting time.Please keep us updated! Im sending you positive thoughts.', 'That sounds really rough. Im sorry youre going through such a tough time. It sounds Hyperactive behavior your wife has been treating you horribly for a while now.I think the best thing you can do is get through the day. At some point youll need to feel Numbness and at some point youll need to get some release. Try to Sedated state or Numbness yourself by vegging in front of the TV or having a few beers (dont buy enough to get sick). Releasing the pent up frustration could be through a work out or venting to a friend. If you live in a safe neighborhood, long walks are helpful.Is there a friend or family member who could stay with you for a night or two? Venting to us is great, and Id be happy to PM, but hugs are hard to give online.All of the cliches are true. It gets better. Keep your chin up. What doesnt kill you make you stronger. If all those sound Hyperactive behavior bullshit (they often do), just remember to breathe."]
39
  ]
40
  suicide_title = "Suicide Task"
41
- suicide_desc = "Enter Reddit posts to generate labels from 3 models (BERT, MentalBERT, PHS-BERT). The 5 labels represent increasing risk to sucide ideation (0='minimum risk', 4='maximum risk'). The three provided examples have true labels 1,2,4 respectively. For more details, please refer to the R-SSD dataset description in our paper (link provided in the corresponding Hugging Face repository)."
42
 
43
  stress_examples = [
44
- ["I'm not massively worried about it at the moment because it feels good but my question is: Is this a normal symptom of PTSD and if it continues tomorrow, should I call 111 for medical advice? I'm home alone for the next few days, should I try and stay at a friends? Thank you! Edit: Thanks for the advice, I have got in touch with my doctor and they are going to give me a call later today. Hopefully I can get this sorted out soon!"],
45
- ["My other brother is quite religious / catholic - not sure how this will impact how he reacts when he finds out. Also, my husband now finds it very very hard to be around my brother when my mom and him and his gf get together for family occasions. I don't find it totally difficult, because he's always been in my life and I've gotten so used to just burying it and forgetting about the abuse. But my husband, understandably, has a different perspective. He tries to stay 'strong' and act as 'normal' as possible when we get together so that no one thinks anything is 'wrong' or asks / puts us on the spot."],
46
  ["My daughter's father I was with for 5 years on and off. He was not abusive the first year, however when he became so I left and found out two weeks later I was pregnant. Of course he begged and pleaded for a second chance, and I believed that my daughter deserved me to at least give it a shot. I came back and surprise surprise it was worse than it ever was. I stuck it out until he disappeared for the eleventeenth time on a drunken bender, I checked my Facebook to find some scumbag girl who was dating one of his best friends was posting horrific, nasty, way out shit about me."]
47
  ]
48
  stress_title = "Stress Task"
49
- stress_desc = "Enter Reddit posts to generate labels from 3 models (BERT, MentalBERT, PHS-BERT). Label 0='no stress', 1='stress'. The three provided examples have true labels 0,0,1 respectively. For more details, please refer to the Dreaddit dataset description in our paper (link provided in the corresponding Hugging Face repository)."
50
 
51
  other_examples = [
52
  ["@anxietyfighter suffered social anxiety for 4 yrs when i had my first panic attack,got worse when i went to uni, so have just started paxil"],
53
- ["@DoctorBlueDream and when I came off Prozac the cycling started again. I would go from being down to being extremely manic and evil >>"],
54
  ["@JessBarrett227 Taking someone off 150mg off Seroquel, mixing it with Olanzapine in 2 wks causes psychosis - a proper assess was not done. "]
55
  ]
56
  other_title = "Other Health Related Task"
57
- other_desc = "Enter drug-related tweets to generate labels from 3 models (BERT, MentalBERT, PHS-BERT). Label 0='no adverse drug reaction', 1='adverse drug reaction'. The three provided examples have true labels 0,0,1 respectively. For more details, please refer to the SMM4H T1 dataset description in our paper (link provided in the corresponding Hugging Face repository)."
58
 
59
  # def make_interfaces(folder):
60
  # predictor_bert = ktrain.load_predictor(folder + "bert")
 
6
  ["In child protective services, further providing for definitions, for immunity from liability"],
7
  ["Lol what? Measles is a real thing. Get vaccinated"]]
8
  vs_title = "Vaccine Sentiment Task"
9
+ vs_desc = "Enter vaccine-related tweets to generate labels from 3 models (BERT, MentalBERT, PHS-BERT). Label 0='vaccine critical', 1='neutral', 2='vaccine supportive'. The three provided examples have true labels 0,1,2 respectively (NOTE: you may have to click submit again to generate the correct labels). For more details, please refer to the VS2 dataset description in our paper (link provided in the corresponding Hugging Face repository)."
10
 
11
  hm_examples = [
12
  ["Serious as a heart attack question/thought Riddle me this. Why, oh why, does cold brew coffee get warm after sitting to long. Taste terrible. And Hot coffee get literally COLD after sitting too long. Tastes terrible. Like what. Why don't cold stay cold and hot only get warm?"],
13
+ # ["It's odd how humans are considered predators when they have a heart attack and run like mad when a small insect is running straight towards them."],
14
  ["The older we get the less likely we are to view a sudden massive heart attack as a tragedy than a stroke of good luck."]]
15
  hm_title = "Health Mention Task"
16
+ hm_desc = "Enter health-related tweets to generate labels from 3 models (BERT, MentalBERT, PHS-BERT). Label 0='Figurative Mentions', 1='Non-Health Mentions', 2='Health mentions'. The two provided examples have true labels 0,2 respectively (NOTE: you may have to click submit again to generate the correct labels). For more details, please refer to the RHMD dataset description in our paper (link provided in the corresponding Hugging Face repository)."
17
 
18
  dep_examples = [
19
  ["Nothing major, some underage drinking, a little pot, but I wasn't a bad kid. Furthermore, I feel like I matured well and have gone on to be successful for my age (24) IMO. I've also had positive experiences with police. The resource officer at my high school was a really good guy and almost like a mentor to me. When I was 17 I was arrested when police raided a friends house because they were tipped off that there was to be some under-aged drinking. Furthermore, I told him before we got really serious that I have anxiety and depression, and if he can’t handle that then I’ll understand if we end things. But *he* chose to stay with me and help me if I wanted it. Honestly I’m just tired of defending myself to him after this fight. I shouldn’t have to. And he kept threatening to break up; then why don’t you do it?"],
 
21
  ["i have horrible vivid nightmares every night. sometimes they're trauma related, but most of the time they're about murder, torture and such depraved things that I can't talk about to anyone. every morning i wake up drenched in sweat, and sometimes vomiting. i have no idea what to do. it's ruining my life."]
22
  ]
23
  dep_title = "Depression Task"
24
+ dep_desc = "Enter X to generate labels from 3 models (BERT, MentalBERT, PHS-BERT). Label 0='x', 1='y', 2='z'. The three provided examples have true labels 0,1,2 respectively (NOTE: you may have to click submit again to generate the correct labels). For more details, please refer to the X dataset description in our paper (link provided in the corresponding Hugging Face repository)."
25
 
26
  covid_examples = [
27
  ["Second person-to-person coronavirus transmission reported in US, CDC says #FoxNews - I thought you fixed it?"],
28
+ # ["Do you expect a travel ban to work? #aircraft #airplane #airplanes #airport #Airports #avgeek #aviation #aviationdaily #aviationgeek #aviationlife #aviationlovers #AvSec #crewlife #Cybersecurity #flight #Flyer #flying #infosec #pilot #pilotlife #travel"],
29
  ["The latest Boarding Pass! #budget2020 #coronavirus"]
30
  ]
31
  covid_title = "COVID Related Task"
32
+ covid_desc = "Enter covid-related tweets to generate labels from 3 models (BERT, MentalBERT, PHS-BERT). Label 0='news', 1='personal narrative'. The two provided examples have true labels 0,1 respectively (NOTE: you may have to click submit again to generate the correct labels). For more details, please refer to the Covid category dataset description in our paper (link provided in the corresponding Hugging Face repository)."
33
 
34
  # 2nd example looks like the most risk
35
  suicide_examples = [
 
38
  ["Friendships are complicated. Close friendships between three people are even more complicated. Maybe its time to expand your circle of friends. Theres no need to get rid of the two friends youre talking about. Maybe theyll come around and maybe they wont. Either way, theres nothing wrong with meeting new people.Try to keep in mind that a lot of the people at your school (if not all of them) are thinking the EXACT same things as you. 'Nobody likes me. I wish I had more friends.' If you were to make a point of chatting with a few new people every day, theyd probably be extremely grateful to you, and might end up being good friends of yours. What kind of activities are you involved in?It sounds Hyperactive behavior you Irritable Mood a lot to your mom, and you must care about her too if youre considering her feelings (not all teenagers would have the selflessness and empathy to do that). Maybe youd feel better if you talked to her about some of this. Is it possible to have dinner together tonight? Maybe you could plan some kind of event with her, Hyperactive behavior a movie or a manicure. Also, you could offer to run errands with her some evening or on the weekend. She might appreciate the company and Ive found it makes great visiting time.Please keep us updated! Im sending you positive thoughts.', 'That sounds really rough. Im sorry youre going through such a tough time. It sounds Hyperactive behavior your wife has been treating you horribly for a while now.I think the best thing you can do is get through the day. At some point youll need to feel Numbness and at some point youll need to get some release. Try to Sedated state or Numbness yourself by vegging in front of the TV or having a few beers (dont buy enough to get sick). Releasing the pent up frustration could be through a work out or venting to a friend. If you live in a safe neighborhood, long walks are helpful.Is there a friend or family member who could stay with you for a night or two? Venting to us is great, and Id be happy to PM, but hugs are hard to give online.All of the cliches are true. It gets better. Keep your chin up. What doesnt kill you make you stronger. If all those sound Hyperactive behavior bullshit (they often do), just remember to breathe."]
39
  ]
40
  suicide_title = "Suicide Task"
41
+ suicide_desc = "Enter Reddit posts to generate labels from 3 models (BERT, MentalBERT, PHS-BERT). The 5 labels represent increasing risk to sucide ideation (0='minimum risk', 4='maximum risk'). The three provided examples have true labels 1,2,4 respectively (NOTE: you may have to click submit again to generate the correct labels). For more details, please refer to the R-SSD dataset description in our paper (link provided in the corresponding Hugging Face repository)."
42
 
43
  stress_examples = [
44
+ # ["I'm not massively worried about it at the moment because it feels good but my question is: Is this a normal symptom of PTSD and if it continues tomorrow, should I call 111 for medical advice? I'm home alone for the next few days, should I try and stay at a friends? Thank you! Edit: Thanks for the advice, I have got in touch with my doctor and they are going to give me a call later today. Hopefully I can get this sorted out soon!"],
45
+ # ["My other brother is quite religious / catholic - not sure how this will impact how he reacts when he finds out. Also, my husband now finds it very very hard to be around my brother when my mom and him and his gf get together for family occasions. I don't find it totally difficult, because he's always been in my life and I've gotten so used to just burying it and forgetting about the abuse. But my husband, understandably, has a different perspective. He tries to stay 'strong' and act as 'normal' as possible when we get together so that no one thinks anything is 'wrong' or asks / puts us on the spot."],
46
  ["My daughter's father I was with for 5 years on and off. He was not abusive the first year, however when he became so I left and found out two weeks later I was pregnant. Of course he begged and pleaded for a second chance, and I believed that my daughter deserved me to at least give it a shot. I came back and surprise surprise it was worse than it ever was. I stuck it out until he disappeared for the eleventeenth time on a drunken bender, I checked my Facebook to find some scumbag girl who was dating one of his best friends was posting horrific, nasty, way out shit about me."]
47
  ]
48
  stress_title = "Stress Task"
49
+ stress_desc = "Enter Reddit posts to generate labels from 3 models (BERT, MentalBERT, PHS-BERT). Label 0='no stress', 1='stress'. The provided example has a true label of 1 (NOTE: you may have to click submit again to generate the correct label). For more details, please refer to the Dreaddit dataset description in our paper (link provided in the corresponding Hugging Face repository)."
50
 
51
  other_examples = [
52
  ["@anxietyfighter suffered social anxiety for 4 yrs when i had my first panic attack,got worse when i went to uni, so have just started paxil"],
 
53
  ["@JessBarrett227 Taking someone off 150mg off Seroquel, mixing it with Olanzapine in 2 wks causes psychosis - a proper assess was not done. "]
54
  ]
55
  other_title = "Other Health Related Task"
56
+ other_desc = "Enter drug-related tweets to generate labels from 3 models (BERT, MentalBERT, PHS-BERT). Label 0='no adverse drug reaction', 1='adverse drug reaction'. The two provided examples have true labels 0,1 respectively (NOTE: you may have to click submit again to generate the correct labels). For more details, please refer to the SMM4H T1 dataset description in our paper (link provided in the corresponding Hugging Face repository)."
57
 
58
  # def make_interfaces(folder):
59
  # predictor_bert = ktrain.load_predictor(folder + "bert")