Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
|
5 |
-
model = pipeline("text-classification", model="
|
6 |
|
7 |
def input_text_fn(text):
|
8 |
result = model(text)
|
@@ -16,7 +16,8 @@ interface = gr.Interface(
|
|
16 |
inputs="text",
|
17 |
outputs="text",
|
18 |
title="Financial Data Sentiment Analysis",
|
19 |
-
description="Enter financial text to classify it as positive, neutral or negative sentiment."
|
|
|
20 |
)
|
21 |
|
22 |
# Launch the app
|
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
|
5 |
+
model = pipeline("text-classification", model="mrm8488/distilroberta-finetuned-financial-news-sentiment-analysis")
|
6 |
|
7 |
def input_text_fn(text):
|
8 |
result = model(text)
|
|
|
16 |
inputs="text",
|
17 |
outputs="text",
|
18 |
title="Financial Data Sentiment Analysis",
|
19 |
+
description="Enter financial text to classify it as positive, neutral or negative sentiment.",
|
20 |
+
examples=["Our company’s revenue grew by 15% in the last quarter, driven by strong performance in our core markets.", "This year has been challenging due to supply chain disruptions and increased operating expenses. Our profit margins have decreased"]
|
21 |
)
|
22 |
|
23 |
# Launch the app
|