Shatha2030 commited on
Commit
182cb50
·
verified ·
1 Parent(s): 832ea2c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -5,7 +5,7 @@ from transformers import pipeline
5
  sentiment_pipeline = pipeline("sentiment-analysis")
6
 
7
  def analyze_sentiment(text):
8
- result = sentiment_pipeline(text)[0] # ✅ إضافة المسافة البادئة
9
  label = result["label"]
10
  score = result["score"]
11
  return f"Sentiment: {label}\nConfidence: {score:.2f}"
 
5
  sentiment_pipeline = pipeline("sentiment-analysis")
6
 
7
  def analyze_sentiment(text):
8
+ result = sentiment_pipeline(text)[0]
9
  label = result["label"]
10
  score = result["score"]
11
  return f"Sentiment: {label}\nConfidence: {score:.2f}"