keynes42 commited on
Commit
e3fdf28
·
verified ·
1 Parent(s): fb1b514

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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-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,13 +70,13 @@ 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-8B-Instruct", hf_token=""):
74
  print("BasicAgent initialized.")
75
  print("ENV-HF_TOKEN-LEN", len(hf_token), file=sys.stderr)
76
  check_token_access()
77
 
78
  # Initialize the model
79
- # model = HfApiModel(model_id="meta-llama/Llama-3.1-8B-Instruct",
80
  # # format="text-generation",
81
  # token=os.environ["HF_TOKEN"],
82
  # max_tokens=2048,
 
30
  print("❌ No token found")
31
  return
32
  headers = {"Authorization": f"Bearer {token}"}
33
+ url = "https://huggingface.co/meta-llama/Llama-3.1-70B-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-70B-Instruct", hf_token=""):
74
  print("BasicAgent initialized.")
75
  print("ENV-HF_TOKEN-LEN", len(hf_token), file=sys.stderr)
76
  check_token_access()
77
 
78
  # Initialize the model
79
+ # model = HfApiModel(model_id="meta-llama/Llama-3.1-70B-Instruct",
80
  # # format="text-generation",
81
  # token=os.environ["HF_TOKEN"],
82
  # max_tokens=2048,