Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests, os
|
| 2 |
+
from huggingface_hub import HfApi
|
| 3 |
+
|
| 4 |
+
# Download train.bin from Google link
|
| 5 |
+
print("Downloading train.bin...")
|
| 6 |
+
r = requests.get("https://storage.googleapis.com/kagglesdsdata/datasets/10431689/16278810/train.bin?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=gcp-kaggle-com%40kaggle-161607.iam.gserviceaccount.com%2F20260529%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20260529T101301Z&X-Goog-Expires=259200&X-Goog-SignedHeaders=host&X-Goog-Signature=7910ae472b412023f7a254981874569c44c4ce651f388d0bc8e98056b0ce481eff1b3a60406b300b797ef7f881f4699b89106b83a60e9367ae1e4b1b43c1614d40f75e3b8bd205fd765af7f3f6195da096e15779d6b3bf1ad836bf0fb4074eb1779796c99abf41ca9b1ce61bf2fa81e95ce75e5df9b6f00e217f1917e96788990f6c8e2577cc10144982a98508a628e46fc7a36b476b898c3b82dea4755b144d70920a99be9a25d3b9e3c343aff8be4fc7954ccfc97963ef5cbf7b5342bcf578f85d89e93236c5e6c70696cbace1d0de20dc8c791b8c970c6a6bd8ff99a84fd41668004e42bc8d56d1ee9e2768c5d973a41ee3d7faeecafbaae0633ab5a60752", stream=True)
|
| 7 |
+
with open("/data/train.bin", "wb") as f:
|
| 8 |
+
for chunk in r.iter_content(chunk_size=8*1024*1024):
|
| 9 |
+
f.write(chunk)
|
| 10 |
+
print(f"Downloaded: {os.path.getsize('/data/train.bin')/1e9:.2f} GB")
|
| 11 |
+
print("Done ✅")
|