Spaces:
Runtime error
Runtime error
Albert NIYONSENGA
commited on
Commit
•
c1b01ab
1
Parent(s):
d7f762d
modified
Browse files
app.py
CHANGED
@@ -30,8 +30,8 @@ tokenizer, model = None, None
|
|
30 |
try:
|
31 |
# Attempt to load the tokenizer and model
|
32 |
with st.spinner("Loading model and tokenizer..."):
|
33 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name, token=True)
|
34 |
-
model = AutoModelForCausalLM.from_pretrained(model_name, token=True)
|
35 |
st.success("Model and tokenizer loaded successfully!")
|
36 |
except Exception as e:
|
37 |
st.error("Failed to load the model or tokenizer. Please check your configuration.")
|
|
|
30 |
try:
|
31 |
# Attempt to load the tokenizer and model
|
32 |
with st.spinner("Loading model and tokenizer..."):
|
33 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, token=True, cache_dir="./cache")
|
34 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, token=True, cache_dir="./cache")
|
35 |
st.success("Model and tokenizer loaded successfully!")
|
36 |
except Exception as e:
|
37 |
st.error("Failed to load the model or tokenizer. Please check your configuration.")
|