Spaces:
Runtime error
Runtime error
paragon-analytics
commited on
Commit
·
82818a6
1
Parent(s):
d2c6fef
Update app.py
Browse files
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([["
|
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()
|