erojuns commited on
Commit
3ead94e
·
1 Parent(s): d2a97e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -1,6 +1,9 @@
1
- from transformers import pipeline
 
2
 
3
- classifier = pipeline("sentiment-analysis")
4
- classifier("I've been waiting for a HuggingFace course my whole life.")
5
- [{'label': 'POSITIVE', 'score': 0.9598047137260437},
6
- {'label': 'NEGATIVE', 'score': 0.9994558095932007}]
 
 
 
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)