OatNapat commited on
Commit
a59b91f
·
1 Parent(s): 8258f3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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("Enter a sentence for sentiment analysis:")
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: {sentiment_label} ({sentiment_explanation})")
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