Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,5 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
-
def text_summarize(text):
|
4 |
-
pipe=pipeline("summarization", model="nickmuchi/fb-bart-large-finetuned-trade-the-event-finance-summarizer")
|
5 |
-
summary = text_summarize(text)[0]['summary_text']
|
6 |
-
return summary
|
7 |
|
8 |
def sentiment(summary):
|
9 |
pipe = pipeline("text-classification", model="WillWEI0103/CustomModel_finance_sentiment_analytics")
|
@@ -22,7 +18,8 @@ def main():
|
|
22 |
|
23 |
#Stage 1: Text Summarization
|
24 |
st.text('Processing Finance News Summarization...')
|
25 |
-
|
|
|
26 |
st.write(summary)
|
27 |
|
28 |
#Stage 2: Sentiment Analytics
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
|
|
|
|
|
|
|
|
3 |
|
4 |
def sentiment(summary):
|
5 |
pipe = pipeline("text-classification", model="WillWEI0103/CustomModel_finance_sentiment_analytics")
|
|
|
18 |
|
19 |
#Stage 1: Text Summarization
|
20 |
st.text('Processing Finance News Summarization...')
|
21 |
+
text_summarize=pipeline("summarization", model="nickmuchi/fb-bart-large-finetuned-trade-the-event-finance-summarizer")
|
22 |
+
summary=text_summarize(text)[0]['summary_text']
|
23 |
st.write(summary)
|
24 |
|
25 |
#Stage 2: Sentiment Analytics
|