Update app.py
Browse files
app.py
CHANGED
|
@@ -46,13 +46,7 @@ def classify_text(
|
|
| 46 |
|
| 47 |
if model_name in CUSTOM_MODELS:
|
| 48 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 49 |
-
classifier = pipeline("zero-shot-classification",
|
| 50 |
-
model=model_name,
|
| 51 |
-
device=device,
|
| 52 |
-
tokenizer=tokenizer,
|
| 53 |
-
trust_remote_code=True
|
| 54 |
-
)
|
| 55 |
-
|
| 56 |
else:
|
| 57 |
classifier = pipeline("zero-shot-classification", model=model_name, device=device)
|
| 58 |
|
|
|
|
| 46 |
|
| 47 |
if model_name in CUSTOM_MODELS:
|
| 48 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 49 |
+
classifier = pipeline("zero-shot-classification", model=model_name, device=device, tokenizer=tokenizer, trust_remote_code=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
else:
|
| 51 |
classifier = pipeline("zero-shot-classification", model=model_name, device=device)
|
| 52 |
|