dwb2023 commited on
Commit
76f6945
1 Parent(s): dce3abc

Update app.py

Browse files

add headers to https request

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -28,7 +28,8 @@ def get_model_summary(model_name):
28
  try:
29
  # Fetch the config.json file
30
  config_url = f"https://huggingface.co/{model_name}/raw/main/config.json"
31
- response = requests.get(config_url)
 
32
  response.raise_for_status()
33
  config = response.json()
34
  architecture = config["architectures"][0]
 
28
  try:
29
  # Fetch the config.json file
30
  config_url = f"https://huggingface.co/{model_name}/raw/main/config.json"
31
+ headers = {"Authorization": f"Bearer {hf_token}"}
32
+ response = requests.get(config_url, headers=headers)
33
  response.raise_for_status()
34
  config = response.json()
35
  architecture = config["architectures"][0]