ghost7 commited on
Commit
e2101d5
·
verified ·
1 Parent(s): 5705bf5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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 = "." # 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
 
 
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