Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ model = AutoModelForSequenceClassification.from_pretrained("OatNapat/finetuned_y
|
|
| 9 |
nlp = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
|
| 10 |
|
| 11 |
st.title("Sentiment Analysis App")
|
| 12 |
-
user_input = st.text_input("
|
| 13 |
if user_input:
|
| 14 |
result = nlp(user_input)
|
| 15 |
sentiment_label = result[0]["label"]
|
|
@@ -27,6 +27,6 @@ if user_input:
|
|
| 27 |
# Get the explanation for the sentiment label
|
| 28 |
sentiment_explanation = sentiment_explanations.get(sentiment_label, "Unknown")
|
| 29 |
|
| 30 |
-
st.write(f"Sentiment: {
|
| 31 |
st.write(f"Confidence: {sentiment_score:.4f}")
|
| 32 |
|
|
|
|
| 9 |
nlp = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
|
| 10 |
|
| 11 |
st.title("Sentiment Analysis App")
|
| 12 |
+
user_input = st.text_input("ป้อนประโยคเพื่อวิเคราะห์ความรู้สึก:")
|
| 13 |
if user_input:
|
| 14 |
result = nlp(user_input)
|
| 15 |
sentiment_label = result[0]["label"]
|
|
|
|
| 27 |
# Get the explanation for the sentiment label
|
| 28 |
sentiment_explanation = sentiment_explanations.get(sentiment_label, "Unknown")
|
| 29 |
|
| 30 |
+
st.write(f"Sentiment: {sentiment_explanation}")
|
| 31 |
st.write(f"Confidence: {sentiment_score:.4f}")
|
| 32 |
|