Spaces:
Runtime error
Runtime error
DanyaalMajid
commited on
Commit
•
92f783d
1
Parent(s):
a527847
Update app.py
Browse files
app.py
CHANGED
@@ -54,8 +54,8 @@ def main():
|
|
54 |
st.write(f"Label with the highest score: {max_score_label}, Highest Score: {max_score}")
|
55 |
|
56 |
|
57 |
-
|
58 |
-
|
59 |
|
60 |
# Parse JSON data
|
61 |
data = emotion_text_classifier(user_text)
|
@@ -66,6 +66,7 @@ def main():
|
|
66 |
score = entry["score"]
|
67 |
st.write(f"Label: {label}, Score: {score}")
|
68 |
|
|
|
69 |
if analysis_type == "Named Entity Recognition":
|
70 |
st.subheader("Named Entity Recognition:")
|
71 |
|
@@ -82,6 +83,7 @@ def main():
|
|
82 |
end = entry["end"]
|
83 |
st.write(f"Word: {word}, Entity Group: {entity_group}, Score: {score}, Start: {start}, End: {end}")
|
84 |
|
|
|
85 |
if analysis_type == "Toxicity Analysis":
|
86 |
st.subheader("Toxicity Analysis:")
|
87 |
|
|
|
54 |
st.write(f"Label with the highest score: {max_score_label}, Highest Score: {max_score}")
|
55 |
|
56 |
|
57 |
+
if analysis_type == "Emotion Analysis":
|
58 |
+
st.subheader("Emotion Analysis:")
|
59 |
|
60 |
# Parse JSON data
|
61 |
data = emotion_text_classifier(user_text)
|
|
|
66 |
score = entry["score"]
|
67 |
st.write(f"Label: {label}, Score: {score}")
|
68 |
|
69 |
+
|
70 |
if analysis_type == "Named Entity Recognition":
|
71 |
st.subheader("Named Entity Recognition:")
|
72 |
|
|
|
83 |
end = entry["end"]
|
84 |
st.write(f"Word: {word}, Entity Group: {entity_group}, Score: {score}, Start: {start}, End: {end}")
|
85 |
|
86 |
+
|
87 |
if analysis_type == "Toxicity Analysis":
|
88 |
st.subheader("Toxicity Analysis:")
|
89 |
|