Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from transformers import pipeline
|
| 3 |
+
|
| 4 |
+
sentiment=pipeline("sentiment-analysis")
|
| 5 |
+
|
| 6 |
+
def ana_sent(input_text):
|
| 7 |
+
return sentiment(input_text)
|
| 8 |
+
|
| 9 |
+
iface=gr.Interface(fn=ana_sent,inputs="text",outputs=['text'],title='Analyse des sentiment',description="entrer un texte en Anglais ")
|
| 10 |
+
|
| 11 |
+
iface.launch(inline=False)
|