Albert NIYONSENGA
commited on
Commit
·
57b0abc
1
Parent(s):
538c8f0
modified
Browse files
app.py
CHANGED
@@ -25,8 +25,8 @@ tokenizer, model = None, None
|
|
25 |
try:
|
26 |
# Attempt to load the tokenizer and model
|
27 |
with st.spinner("Loading model and tokenizer..."):
|
28 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name, token=
|
29 |
-
model = AutoModelForCausalLM.from_pretrained(model_name, token=
|
30 |
st.success("Model and tokenizer loaded successfully!")
|
31 |
except Exception as e:
|
32 |
st.error("Failed to load the model or tokenizer. Please check your configuration.")
|
|
|
25 |
try:
|
26 |
# Attempt to load the tokenizer and model
|
27 |
with st.spinner("Loading model and tokenizer..."):
|
28 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, token=True)
|
29 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, token=True)
|
30 |
st.success("Model and tokenizer loaded successfully!")
|
31 |
except Exception as e:
|
32 |
st.error("Failed to load the model or tokenizer. Please check your configuration.")
|