Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
-
import time
|
4 |
|
5 |
access = "hf_"
|
6 |
token = "hhbFNpjKohezoexWMlyPUpvJQLWlaFhJaa"
|
@@ -24,7 +23,9 @@ score_1 = 0.0
|
|
24 |
label_2 = ""
|
25 |
score_2 = 0.0
|
26 |
|
27 |
-
|
|
|
|
|
28 |
# Perform text analysis on the input text
|
29 |
results_1 = analysis(text)[0]
|
30 |
results_2 = classification(text)[0]
|
@@ -41,4 +42,3 @@ st.write("Trend_Score:", score_1)
|
|
41 |
|
42 |
st.write("Finance Topic:", label_2)
|
43 |
st.write("Topic_Score:", score_2)
|
44 |
-
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
|
|
3 |
|
4 |
access = "hf_"
|
5 |
token = "hhbFNpjKohezoexWMlyPUpvJQLWlaFhJaa"
|
|
|
23 |
label_2 = ""
|
24 |
score_2 = 0.0
|
25 |
|
26 |
+
analyze_clicked = st.button("Analyze")
|
27 |
+
|
28 |
+
if analyze_clicked:
|
29 |
# Perform text analysis on the input text
|
30 |
results_1 = analysis(text)[0]
|
31 |
results_2 = classification(text)[0]
|
|
|
42 |
|
43 |
st.write("Finance Topic:", label_2)
|
44 |
st.write("Topic_Score:", score_2)
|
|