Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,12 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
|
5 |
-
sentiment_label = 0
|
6 |
-
context = 0
|
7 |
-
question = 0
|
8 |
|
9 |
|
10 |
# Streamlit application title
|
11 |
st.title("Financial News Sentiment Analysis")
|
12 |
-
st.write("Identify the sentiment to help you make decisions.")
|
13 |
|
14 |
# Load the summarization and sentiment analysis pipelines
|
15 |
|
@@ -42,7 +39,7 @@ else:
|
|
42 |
question = "What's the opinion?"
|
43 |
|
44 |
# Generate the answer
|
45 |
-
result = qa_pipe(question=question, context=context)[
|
46 |
|
47 |
# Display different buttons based on sentiment
|
48 |
if sentiment_label == "positive":
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
|
|
|
|
|
|
|
5 |
|
6 |
|
7 |
# Streamlit application title
|
8 |
st.title("Financial News Sentiment Analysis")
|
9 |
+
st.write("Identify the sentiment and look into the key point to help you make decisions.")
|
10 |
|
11 |
# Load the summarization and sentiment analysis pipelines
|
12 |
|
|
|
39 |
question = "What's the opinion?"
|
40 |
|
41 |
# Generate the answer
|
42 |
+
result = qa_pipe(question=question, context=context)["answer"]
|
43 |
|
44 |
# Display different buttons based on sentiment
|
45 |
if sentiment_label == "positive":
|