Update app.py
Browse files
app.py
CHANGED
|
@@ -2,8 +2,8 @@ from transformers import DistilBertTokenizer, DistilBertForSequenceClassificatio
|
|
| 2 |
import torch
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
-
# Load
|
| 6 |
-
model_path = "
|
| 7 |
tokenizer = DistilBertTokenizer.from_pretrained(model_path)
|
| 8 |
model = DistilBertForSequenceClassification.from_pretrained(model_path)
|
| 9 |
|
|
|
|
| 2 |
import torch
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
+
# Load the pre-trained model and tokenizer from the root directory
|
| 6 |
+
model_path = "." # Use "." to indicate the root directory where files are located
|
| 7 |
tokenizer = DistilBertTokenizer.from_pretrained(model_path)
|
| 8 |
model = DistilBertForSequenceClassification.from_pretrained(model_path)
|
| 9 |
|