Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,13 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
-
iface
|
| 7 |
-
iface.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
import gradio as gr
|
| 4 |
+
from transformers import pipeline
|
| 5 |
+
|
| 6 |
+
sentiment = pipeline("sentiment-analysis")
|
| 7 |
+
|
| 8 |
+
def get_sentiment(input_text):
|
| 9 |
+
return sentiment(input_text)
|
| 10 |
+
|
| 11 |
+
iface = gr.Interface(fn =get_sentiment, inputs= "text", outputs = ['text'], title = "Sentiment Analysis", description ="Get sentiment Negative/Positive for the given input")
|
| 12 |
|
| 13 |
+
iface.launch(inline=False)
|
|
|