Spaces:
Sleeping
Sleeping
Update app.py
Browse filesFormatted output
app.py
CHANGED
@@ -15,7 +15,7 @@ def analyze_sentiment(text):
|
|
15 |
"sentiment": result['label'],
|
16 |
"confidence": result['score']
|
17 |
})"""
|
18 |
-
return result
|
19 |
|
20 |
# Define Gradio interface
|
21 |
iface = gr.Interface(fn=analyze_sentiment, inputs="text", outputs="text", title="Arabic Sentiment Analysis")
|
|
|
15 |
"sentiment": result['label'],
|
16 |
"confidence": result['score']
|
17 |
})"""
|
18 |
+
return f"sentiment: {result['label']}, confidence: {result['score']}"
|
19 |
|
20 |
# Define Gradio interface
|
21 |
iface = gr.Interface(fn=analyze_sentiment, inputs="text", outputs="text", title="Arabic Sentiment Analysis")
|