Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ def check_token_access():
|
|
30 |
print("❌ No token found")
|
31 |
return
|
32 |
headers = {"Authorization": f"Bearer {token}"}
|
33 |
-
url = "https://huggingface.co/meta-llama/Llama-3.1-
|
34 |
try:
|
35 |
r = requests.get(url, headers=headers, timeout=10)
|
36 |
print(f"🔍 Token test response: {r.status_code}")
|
@@ -70,7 +70,7 @@ class PreloadedPythonTool(PythonInterpreterTool):
|
|
70 |
# --- Basic Model Definition ---
|
71 |
# ----- THIS IS WHERE YOU CAN BUILD WHAT YOU WANT ------
|
72 |
class BasicModel:
|
73 |
-
def __init__(self, model_id="meta-llama/Llama-3.1-
|
74 |
print("BasicAgent initialized.")
|
75 |
print("ENV-HF_TOKEN-LEN", len(hf_token), file=sys.stderr)
|
76 |
check_token_access()
|
|
|
30 |
print("❌ No token found")
|
31 |
return
|
32 |
headers = {"Authorization": f"Bearer {token}"}
|
33 |
+
url = "https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct/resolve/main/config.json"
|
34 |
try:
|
35 |
r = requests.get(url, headers=headers, timeout=10)
|
36 |
print(f"🔍 Token test response: {r.status_code}")
|
|
|
70 |
# --- Basic Model Definition ---
|
71 |
# ----- THIS IS WHERE YOU CAN BUILD WHAT YOU WANT ------
|
72 |
class BasicModel:
|
73 |
+
def __init__(self, model_id="meta-llama/Llama-3.1-8B-Instruct", hf_token=""):
|
74 |
print("BasicAgent initialized.")
|
75 |
print("ENV-HF_TOKEN-LEN", len(hf_token), file=sys.stderr)
|
76 |
check_token_access()
|