Commit
·
afd8926
1
Parent(s):
5722466
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
|
5 |
|
6 |
def predict(text):
|
7 |
-
return
|
8 |
|
9 |
demo gr.Interface(
|
10 |
fn=predict,
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
classifier = pipeline("sentiment-analysis")
|
5 |
|
6 |
def predict(text):
|
7 |
+
return classifier(text)
|
8 |
|
9 |
demo gr.Interface(
|
10 |
fn=predict,
|