paragon-analytics commited on
Commit
82818a6
·
1 Parent(s): d2c6fef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,7 +18,7 @@ def adr_predict(x):
18
  return {"Severe Reaction": float(scores.numpy()[1]), "Non-severe Reaction": float(scores.numpy()[0])}
19
 
20
  def main(text):
21
- text = str(text)
22
  obj = adr_predict(text)
23
  return obj[0]
24
 
@@ -53,6 +53,6 @@ with gr.Blocks(title=title) as demo:
53
  )
54
 
55
  gr.Markdown("### Click on any of the examples below to see to what extent they contain resilience messaging:")
56
- gr.Examples([["Please stay at home and avoid unnecessary trips."],["Please stay at home and avoid unnecessary trips. We will survive this."],["We will survive this."],["Watch today’s news briefing with the latest updates on COVID-19 in Connecticut."],["So let's keep doing what we know works. Let's stay strong, and let's beat this virus. I know we can, and I know we can come out stronger on the other side."],["It is really wonderful how much resilience there is in human nature. Let any obstructing cause, no matter what, be removed in any way, even by death, and we fly back to first principles of hope and enjoyment."],["Resilience is accepting your new reality, even if it’s less good than the one you had before. You can fight it, you can do nothing but scream about what you’ve lost, or you can accept that and try to put together something that’s good."],["You survived all of the days you thought you couldn't, never underestimate your resilience."],["Like tiny seeds with potent power to push through tough ground and become mighty trees, we hold innate reserves of unimaginable strength. We are resilient."]], [prob1], [label,impplot,NER,intp], main, cache_examples=True)
57
 
58
  demo.launch()
 
18
  return {"Severe Reaction": float(scores.numpy()[1]), "Non-severe Reaction": float(scores.numpy()[0])}
19
 
20
  def main(text):
21
+ text = str(text).lower()
22
  obj = adr_predict(text)
23
  return obj[0]
24
 
 
53
  )
54
 
55
  gr.Markdown("### Click on any of the examples below to see to what extent they contain resilience messaging:")
56
+ gr.Examples([["I have minor pain."],["I have severe pain."]], [text], [label], main, cache_examples=True)
57
 
58
  demo.launch()