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