Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ from transformers import DistilBertModel, DistilBertTokenizer, DistilBertForSequ
|
|
| 9 |
# Load your self-hosted model
|
| 10 |
model_name = "22A223R/distilbert"
|
| 11 |
tokenizer = DistilBertTokenizer.from_pretrained('distilbert-base-uncased')
|
| 12 |
-
model = DistilBertForSequenceClassification.from_pretrained(model_name,
|
| 13 |
#tokenizer = AutoTokenizer.from_pretrained('distilbert-base-uncased')
|
| 14 |
#model = AutoModelForSequenceClassification.from_pretrained(model_name,ignore_mismatched_sizes=True)
|
| 15 |
|
|
@@ -55,5 +55,4 @@ iface = gr.Interface(fn=classify_text,
|
|
| 55 |
description="This model is a fine-tuned DistilBERT model for detecting fake news. It was trained on the SST-2 dataset. It distinguishes real news from the fiction. Below are some preloaded examples you can choose from or enter your own.",
|
| 56 |
examples=examples)
|
| 57 |
|
| 58 |
-
iface.launch()
|
| 59 |
-
|
|
|
|
| 9 |
# Load your self-hosted model
|
| 10 |
model_name = "22A223R/distilbert"
|
| 11 |
tokenizer = DistilBertTokenizer.from_pretrained('distilbert-base-uncased')
|
| 12 |
+
model = DistilBertForSequenceClassification.from_pretrained(model_name,ignore_mismatched_sizes=True)
|
| 13 |
#tokenizer = AutoTokenizer.from_pretrained('distilbert-base-uncased')
|
| 14 |
#model = AutoModelForSequenceClassification.from_pretrained(model_name,ignore_mismatched_sizes=True)
|
| 15 |
|
|
|
|
| 55 |
description="This model is a fine-tuned DistilBERT model for detecting fake news. It was trained on the SST-2 dataset. It distinguishes real news from the fiction. Below are some preloaded examples you can choose from or enter your own.",
|
| 56 |
examples=examples)
|
| 57 |
|
| 58 |
+
iface.launch()
|
|
|