Spaces:
Sleeping
Sleeping
Fix model authentication issue - use publicly available DeBERTa model
Browse files2 unmodified lines345678910111232 unmodified lines45464748495051525354555657582 unmodified linesimport json# Load the DeBERTa-v3-large-mnli modelprint("Loading model: microsoft/deberta-v3-large-mnli...")classifier = pipeline("zero-shot-classification",model="microsoft/deberta-v3-large-mnli",device=-1 # Use CPU)print("Model loaded successfully!")32 unmodified lines"prediction": result['labels'][0],"confidence": f"{result['scores'][0]:.4f}","all_scores": scores_dict,"model": "microsoft/deberta-v3-large-mnli"}else:output = {"text": text,"prediction": result['labels'][0],"confidence": f"{result['scores'][0]:.4f}","model": "microsoft/deberta-v3-large-mnli"}return output2 unmodified lines345678910111232 unmodified lines45464748495051525354555657582 unmodified linesimport json# Load the DeBERTa-v3-large-mnli modelprint("Loading model: MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanli...")classifier = pipeline("zero-shot-classification",model="MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanli",device=-1 # Use CPU)print("Model loaded successfully!")32 unmodified lines"prediction": result['labels'][0],"confidence": f"{result['scores'][0]:.4f}","all_scores": scores_dict,"model": "MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanli"}else:output = {"text": text,"prediction": result['labels'][0],"confidence": f"{result['scores'][0]:.4f}","model": "MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanli"}return output
app.py+4-4