Spaces:
Sleeping
Sleeping
paragon-analytics
commited on
Commit
•
7fd5f22
1
Parent(s):
a9aeeeb
Update app.py
Browse files
app.py
CHANGED
@@ -102,7 +102,7 @@ def main(prob1):
|
|
102 |
|
103 |
title = "Welcome to **ResText** 🪐"
|
104 |
description1 = """
|
105 |
-
This app takes text (up to a few sentences) and predicts
|
106 |
"""
|
107 |
|
108 |
with gr.Blocks(title=title) as demo:
|
@@ -127,7 +127,7 @@ with gr.Blocks(title=title) as demo:
|
|
127 |
[label,impplot,NER], api_name="ResText"
|
128 |
)
|
129 |
|
130 |
-
gr.Markdown("### Click on any of the examples below to see
|
131 |
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], main, cache_examples=True)
|
132 |
|
133 |
demo.launch()
|
|
|
102 |
|
103 |
title = "Welcome to **ResText** 🪐"
|
104 |
description1 = """
|
105 |
+
This app takes text (up to a few sentences) and predicts to what extent the text contains resilience messaging. Resilience messaging is a text message that is about being able to a) "adapt to change” and b) “bounce back after illness or hardship". The predictive model is a fine-tuned RoBERTa NLP model. Just add your text and hit Analyze. Or, simply click on one of the examples to see how it works. ✨
|
106 |
"""
|
107 |
|
108 |
with gr.Blocks(title=title) as demo:
|
|
|
127 |
[label,impplot,NER], api_name="ResText"
|
128 |
)
|
129 |
|
130 |
+
gr.Markdown("### Click on any of the examples below to see to what extent they contain resilience messaging:")
|
131 |
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], main, cache_examples=True)
|
132 |
|
133 |
demo.launch()
|