Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,12 @@ try:
|
|
15 |
model = PeftModel.from_pretrained(base_model, fine_tuned_model_name)
|
16 |
|
17 |
print("Loading tokenizer...")
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
except Exception as e:
|
21 |
print(f"Error loading the model or tokenizer: {e}")
|
|
|
15 |
model = PeftModel.from_pretrained(base_model, fine_tuned_model_name)
|
16 |
|
17 |
print("Loading tokenizer...")
|
18 |
+
try:
|
19 |
+
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
|
20 |
+
except Exception as e:
|
21 |
+
print(f"Failed to load tokenizer for {base_model_name}: {e}")
|
22 |
+
print("Falling back to a generic tokenizer...")
|
23 |
+
tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neo-1.3B")
|
24 |
|
25 |
except Exception as e:
|
26 |
print(f"Error loading the model or tokenizer: {e}")
|