Spaces:
Runtime error
Runtime error
GiladtheFixer
commited on
Commit
•
6e05fea
1
Parent(s):
04c507d
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
from transformers import pipeline
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
pipe=pipeline('sentiment-analysis')
|
8 |
+
|
9 |
+
def sentiment_calssifir(text):
|
10 |
+
return pipe(text)
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
demo = gr.Interface(fn=sentiment_calssifir, inputs="text", outputs="json")
|
16 |
+
demo.launch()
|