Spaces:
Runtime error
Runtime error
Commit
·
2027dac
1
Parent(s):
32e97e4
Update app.py
Browse files
app.py
CHANGED
@@ -55,13 +55,12 @@ def main():
|
|
55 |
|
56 |
# Parse JSON data
|
57 |
data = emotion_text_classifier(user_text)
|
58 |
-
st.write(data)
|
59 |
-
# Extract and display label and score
|
60 |
-
for
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
st.write(f"Label: {label}, Score: {score}")
|
65 |
|
66 |
if analysis_type == "Named Entity Recognition":
|
67 |
st.subheader("Named Entity Recognition:")
|
|
|
55 |
|
56 |
# Parse JSON data
|
57 |
data = emotion_text_classifier(user_text)
|
58 |
+
#st.write(data)
|
59 |
+
# Extract and display label and score for each entry
|
60 |
+
for entry in data:
|
61 |
+
label = entry["label"]
|
62 |
+
score = entry["score"]
|
63 |
+
print(f"Label: {label}, Score: {score}")
|
|
|
64 |
|
65 |
if analysis_type == "Named Entity Recognition":
|
66 |
st.subheader("Named Entity Recognition:")
|