Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ st.write("Identify the sentiment and look into the key point to help you make de
|
|
13 |
pipe = pipeline("text-classification", model="roselyu/FinSent-XLMR-FinNews")
|
14 |
|
15 |
# User input and sentiment analysis
|
16 |
-
user_input = st.text_area("Enter a short financial news article:")
|
17 |
sentiment_label = pipe(user_input)[0]["label"]
|
18 |
|
19 |
# Summarize and identify sentiment button
|
@@ -25,7 +25,7 @@ if st.button("Identify Sentiment"):
|
|
25 |
|
26 |
|
27 |
# Initialize the question-answering pipeline
|
28 |
-
qa_pipe = pipeline("question-answering", model="
|
29 |
|
30 |
# Set the context and question based on sentiment
|
31 |
if sentiment_label == "positive":
|
|
|
13 |
pipe = pipeline("text-classification", model="roselyu/FinSent-XLMR-FinNews")
|
14 |
|
15 |
# User input and sentiment analysis
|
16 |
+
user_input = st.text_area("Enter a short financial news article to identify its sentiments:")
|
17 |
sentiment_label = pipe(user_input)[0]["label"]
|
18 |
|
19 |
# Summarize and identify sentiment button
|
|
|
25 |
|
26 |
|
27 |
# Initialize the question-answering pipeline
|
28 |
+
qa_pipe = pipeline("question-answering", model="Intel/dynamic_tinybert")
|
29 |
|
30 |
# Set the context and question based on sentiment
|
31 |
if sentiment_label == "positive":
|