Spaces:
Sleeping
Sleeping
Update app.py
Browse filesSentiment analysis pipeline is included!
app.py
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
7 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import pipeline
|
3 |
+
|
4 |
+
def sentiment(name):
|
5 |
+
out = pipe(text)
|
6 |
+
return out
|
7 |
|
8 |
+
pipe = pipeline("sentiment-analysis")
|
9 |
+
iface = gr.Interface(fn=sentiment, inputs="text", outputs="text")
|
|
|
|
|
10 |
iface.launch()
|