Spaces:
Runtime error
Runtime error
Update app.py
#1
by
Rachit-Jain-7
- opened
app.py
CHANGED
@@ -34,10 +34,10 @@ def load_model():
|
|
34 |
model_path = 'https://drive.google.com/file/d/1eygXlGjecEq4yGCx_BqdTCn0eekrRlTh/view?usp=sharing' # Update with the correct file name
|
35 |
|
36 |
# Load the model configuration
|
37 |
-
|
38 |
|
39 |
# Load the model and tokenizer from the specified file path
|
40 |
-
model = AutoModelForSequenceClassification.from_pretrained(model_path)
|
41 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
42 |
return model, tokenizer
|
43 |
|
|
|
34 |
model_path = 'https://drive.google.com/file/d/1eygXlGjecEq4yGCx_BqdTCn0eekrRlTh/view?usp=sharing' # Update with the correct file name
|
35 |
|
36 |
# Load the model configuration
|
37 |
+
config = AutoConfig.from_pretrained(model_path)
|
38 |
|
39 |
# Load the model and tokenizer from the specified file path
|
40 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_path, config = config)
|
41 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
42 |
return model, tokenizer
|
43 |
|