mafoaurelie
commited on
Commit
•
5f0a36f
1
Parent(s):
fae33ea
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
import gradio as gr
|
2 |
-
import transformers
|
3 |
from transformers import pipeline
|
4 |
|
5 |
sentiment= pipeline('sentiment-analysis')
|
@@ -8,7 +7,8 @@ def get_sentiment(input_text):
|
|
8 |
result=texte[0]['label']
|
9 |
return result
|
10 |
|
11 |
-
iface=gr.Interface(title='Sentiment Analysis',
|
|
|
12 |
inputs='text',
|
13 |
outputs='text',
|
14 |
description='Get Sentiment Negative/Positive for giving input').launch()
|
|
|
1 |
import gradio as gr
|
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
sentiment= pipeline('sentiment-analysis')
|
|
|
7 |
result=texte[0]['label']
|
8 |
return result
|
9 |
|
10 |
+
iface=gr.Interface(title='Sentiment Analysis',
|
11 |
+
fn=get_sentiment,
|
12 |
inputs='text',
|
13 |
outputs='text',
|
14 |
description='Get Sentiment Negative/Positive for giving input').launch()
|