Lord-Raven
commited on
Commit
·
0388cf1
1
Parent(s):
6ba5366
Messing with return value.
Browse files
app.py
CHANGED
@@ -4,5 +4,14 @@ from transformers import pipeline
|
|
4 |
|
5 |
classifier = pipeline("text-classification", model="SamLowe/roberta-base-go_emotions")
|
6 |
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
demo.launch()
|
|
|
4 |
|
5 |
classifier = pipeline("text-classification", model="SamLowe/roberta-base-go_emotions")
|
6 |
|
7 |
+
def predict(text):
|
8 |
+
return classifier(text)
|
9 |
+
|
10 |
+
demo = gr.Interface(
|
11 |
+
fn = predict,
|
12 |
+
inputs = 'text',
|
13 |
+
outputs = 'text',
|
14 |
+
)
|
15 |
+
|
16 |
+
# demo = gr.Interface.from_pipeline(classifier)
|
17 |
demo.launch()
|