Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -166,9 +166,17 @@ def get_or_download_image(file_name: str) -> Image.Image:
|
|
166 |
|
167 |
if not os.path.exists(file_path):
|
168 |
print(f"[INFO] File {file_name} non trovato in /data, lo scarico...")
|
169 |
-
url = f"https://huggingface.co/datasets/gaia-benchmark/GAIA/resolve/main/2023/validation/{file_name}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
try:
|
171 |
-
response = requests.get(
|
172 |
response.raise_for_status()
|
173 |
with open(file_path, "wb") as f:
|
174 |
f.write(response.content)
|
|
|
166 |
|
167 |
if not os.path.exists(file_path):
|
168 |
print(f"[INFO] File {file_name} non trovato in /data, lo scarico...")
|
169 |
+
#url = f"https://huggingface.co/datasets/gaia-benchmark/GAIA/resolve/main/2023/validation/{file_name}"
|
170 |
+
|
171 |
+
|
172 |
+
base_url = "https://huggingface.co/datasets/gaia-benchmark/GAIA/resolve"
|
173 |
+
commit_hash = "86620fe7a265fdd074ea8d8c8b7a556a1058b0af"
|
174 |
+
full_url = f"{base_url}/{commit_hash}/2023/validation/{file_name}"
|
175 |
+
|
176 |
+
|
177 |
+
|
178 |
try:
|
179 |
+
response = requests.get(full_url)
|
180 |
response.raise_for_status()
|
181 |
with open(file_path, "wb") as f:
|
182 |
f.write(response.content)
|