Spaces:
Sleeping
Sleeping
Commit
·
c89830e
1
Parent(s):
b4ebcde
Update app.py
Browse files
app.py
CHANGED
@@ -29,13 +29,14 @@ def predict_sentiment(text):
|
|
29 |
|
30 |
label_text = c_labels[sentiment_label]['text']
|
31 |
emoji = c_labels[sentiment_label]['emoji']
|
32 |
-
|
|
|
33 |
return f"{label_text} {emoji} (Model Predicted it as {sentiment_label} with a confidence score of {confidence_score:.2f})"
|
34 |
|
35 |
iface = gr.Interface(
|
36 |
fn=predict_sentiment,
|
37 |
-
inputs=gr.Text(
|
38 |
-
outputs=gr.Text(label="Sentiment Analysis
|
39 |
title="The Misfits Financial Sentimanet Analysis App",
|
40 |
description="Financial Sentiment Analysis is a process of using natural language processing (NLP) and machine learning techniques to analyze and determine the sentiment expressed in financial news, social media, and other textual data related to financial markets. The goal is to understand the emotions and opinions of market participants towards specific financial instruments, companies, or the overall market."
|
41 |
)
|
|
|
29 |
|
30 |
label_text = c_labels[sentiment_label]['text']
|
31 |
emoji = c_labels[sentiment_label]['emoji']
|
32 |
+
|
33 |
+
return [label_text, emoji, f"(Model Predicted it as {sentiment_label} with a confidence score of {confidence_score:.2f})"]
|
34 |
return f"{label_text} {emoji} (Model Predicted it as {sentiment_label} with a confidence score of {confidence_score:.2f})"
|
35 |
|
36 |
iface = gr.Interface(
|
37 |
fn=predict_sentiment,
|
38 |
+
inputs=gr.Text(label="Enter statement to analyze:", placeholder="Type here..."),
|
39 |
+
outputs=[gr.Text(label="Sentiment Analysis"), gr.Text(label="Emoji"), gr.Text(label="Model Prediction Info")],
|
40 |
title="The Misfits Financial Sentimanet Analysis App",
|
41 |
description="Financial Sentiment Analysis is a process of using natural language processing (NLP) and machine learning techniques to analyze and determine the sentiment expressed in financial news, social media, and other textual data related to financial markets. The goal is to understand the emotions and opinions of market participants towards specific financial instruments, companies, or the overall market."
|
42 |
)
|