Spaces:
Sleeping
Sleeping
Update pages/3_Deployment.py
Browse files- pages/3_Deployment.py +12 -2
pages/3_Deployment.py
CHANGED
|
@@ -9,8 +9,18 @@ st.title("π― Live Sentiment Classifier")
|
|
| 9 |
with open("text_classification.pkl", "rb") as f:
|
| 10 |
pipeline = pickle.load(f)
|
| 11 |
|
| 12 |
-
# User input
|
| 13 |
-
user_input = st.text_area(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
if st.button("Predict Sentiment"):
|
| 16 |
if user_input.strip():
|
|
|
|
| 9 |
with open("text_classification.pkl", "rb") as f:
|
| 10 |
pipeline = pickle.load(f)
|
| 11 |
|
| 12 |
+
# User input (updated label, placeholder, and help)
|
| 13 |
+
user_input = st.text_area(
|
| 14 |
+
"##### βοΈ Enter a YouTube comment related to one of the following topics:",
|
| 15 |
+
placeholder="E.g., That reunion video was so emotional!",
|
| 16 |
+
help="""
|
| 17 |
+
**Trained Topics:**
|
| 18 |
+
|
| 19 |
+
- π Positive β heartwarming reunion, kindness stories, feel-good moments
|
| 20 |
+
- π Negative β bad customer experience, airline disaster, controversial news
|
| 21 |
+
- π Neutral β latest tech review, travel vlog, gaming walkthrough
|
| 22 |
+
"""
|
| 23 |
+
)
|
| 24 |
|
| 25 |
if st.button("Predict Sentiment"):
|
| 26 |
if user_input.strip():
|