Spaces:
Paused
Paused
Update app.py
Browse filesadd headers to https request
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 |
-
|
|
|
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]
|