Update app.py
Browse files
app.py
CHANGED
|
@@ -19,6 +19,22 @@ st.image("./Fin.jpg", use_column_width = True)
|
|
| 19 |
# Text input for user to enter the text
|
| 20 |
text = st.text_area("Enter the Financial News", "")
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
# Perform text classification when the user clicks the "Classify" button
|
| 23 |
if st.button("Analyze"):
|
| 24 |
|
|
|
|
| 19 |
# Text input for user to enter the text
|
| 20 |
text = st.text_area("Enter the Financial News", "")
|
| 21 |
|
| 22 |
+
label_1 = ""
|
| 23 |
+
score_1 = 0.0
|
| 24 |
+
label_2 = ""
|
| 25 |
+
score_2 = 0.0
|
| 26 |
+
|
| 27 |
+
if st.button("Analyze"):
|
| 28 |
+
# Perform text analysis on the input text
|
| 29 |
+
results_1 = analysis(text)[0]
|
| 30 |
+
results_2 = classification(text)[0]
|
| 31 |
+
|
| 32 |
+
label_1 = results_1["label"]
|
| 33 |
+
score_1 = results_1["score"]
|
| 34 |
+
label_2 = results_2["label"]
|
| 35 |
+
score_2 = results_2["score"]
|
| 36 |
+
|
| 37 |
+
|
| 38 |
# Perform text classification when the user clicks the "Classify" button
|
| 39 |
if st.button("Analyze"):
|
| 40 |
|