Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ from transformers import pipeline
|
|
| 5 |
classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
|
| 6 |
|
| 7 |
def tagging(
|
| 8 |
-
|
| 9 |
tags: str,
|
| 10 |
multi_label: bool
|
| 11 |
):
|
|
@@ -15,7 +15,7 @@ def tagging(
|
|
| 15 |
except error:
|
| 16 |
raise gr.Error(f"Error {error}")
|
| 17 |
|
| 18 |
-
classifier(
|
| 19 |
|
| 20 |
return text
|
| 21 |
|
|
|
|
| 5 |
classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
|
| 6 |
|
| 7 |
def tagging(
|
| 8 |
+
text_input: str,
|
| 9 |
tags: str,
|
| 10 |
multi_label: bool
|
| 11 |
):
|
|
|
|
| 15 |
except error:
|
| 16 |
raise gr.Error(f"Error {error}")
|
| 17 |
|
| 18 |
+
classifier(text_input, candidate_labels, multi_label)
|
| 19 |
|
| 20 |
return text
|
| 21 |
|