Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
15 |
|
16 |
@spaces.GPU
|
17 |
def load_llm(hf_token):
|
18 |
-
model_id = "meta-llama/
|
19 |
tok = AutoTokenizer.from_pretrained(model_id, token=hf_token)
|
20 |
mod = AutoModelForCausalLM.from_pretrained(
|
21 |
model_id,
|
@@ -31,7 +31,7 @@ def check_token_access():
|
|
31 |
print("❌ No token found")
|
32 |
return
|
33 |
headers = {"Authorization": f"Bearer {token}"}
|
34 |
-
url = "https://huggingface.co/meta-llama/
|
35 |
try:
|
36 |
r = requests.get(url, headers=headers, timeout=10)
|
37 |
print(f"🔍 Token test response: {r.status_code}")
|
|
|
15 |
|
16 |
@spaces.GPU
|
17 |
def load_llm(hf_token):
|
18 |
+
model_id = "meta-llama/Llama-3.1-8B-Instruct"
|
19 |
tok = AutoTokenizer.from_pretrained(model_id, token=hf_token)
|
20 |
mod = AutoModelForCausalLM.from_pretrained(
|
21 |
model_id,
|
|
|
31 |
print("❌ No token found")
|
32 |
return
|
33 |
headers = {"Authorization": f"Bearer {token}"}
|
34 |
+
url = "https://huggingface.co/meta-llama/Llama-3-8B-Instruct/resolve/main/config.json"
|
35 |
try:
|
36 |
r = requests.get(url, headers=headers, timeout=10)
|
37 |
print(f"🔍 Token test response: {r.status_code}")
|