Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,11 @@
|
|
| 1 |
from transformers import DistilBertTokenizer, DistilBertForSequenceClassification
|
| 2 |
import torch
|
| 3 |
import gradio as gr
|
|
|
|
| 4 |
|
| 5 |
# Load the pre-trained model and tokenizer from the root directory
|
| 6 |
-
model_path = "." #
|
|
|
|
| 7 |
tokenizer = DistilBertTokenizer.from_pretrained(model_path)
|
| 8 |
model = DistilBertForSequenceClassification.from_pretrained(model_path)
|
| 9 |
|
|
|
|
| 1 |
from transformers import DistilBertTokenizer, DistilBertForSequenceClassification
|
| 2 |
import torch
|
| 3 |
import gradio as gr
|
| 4 |
+
import os
|
| 5 |
|
| 6 |
# Load the pre-trained model and tokenizer from the root directory
|
| 7 |
+
model_path = "." # Root directory
|
| 8 |
+
print(f"Checking files in {model_path}: {os.listdir(model_path)}") # Debug: List files in root
|
| 9 |
tokenizer = DistilBertTokenizer.from_pretrained(model_path)
|
| 10 |
model = DistilBertForSequenceClassification.from_pretrained(model_path)
|
| 11 |
|