Commit
·
656c4ee
1
Parent(s):
18418b8
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
-
def
|
| 5 |
classifier = pipeline("zero-shot-classification",
|
| 6 |
model="facebook/bart-large-mnli")
|
| 7 |
|
|
@@ -10,5 +10,5 @@ def greet(text):
|
|
| 10 |
|
| 11 |
return result
|
| 12 |
|
| 13 |
-
iface = gr.Interface(fn=
|
| 14 |
iface.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
+
def do_action(text):
|
| 5 |
classifier = pipeline("zero-shot-classification",
|
| 6 |
model="facebook/bart-large-mnli")
|
| 7 |
|
|
|
|
| 10 |
|
| 11 |
return result
|
| 12 |
|
| 13 |
+
iface = gr.Interface(fn=do_action, inputs="text", outputs="text")
|
| 14 |
iface.launch()
|