Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,9 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from transformers input pipeline
|
| 3 |
|
| 4 |
+
pipe = pipeline('sentiment-analysis')
|
| 5 |
+
text = gr.text_area('test')
|
| 6 |
+
|
| 7 |
+
if text:
|
| 8 |
+
out = pipe(text)
|
| 9 |
+
gr.json(out)
|