Download install.py from Luisito95/BitFlush: direct link, hf CLI and curl.
- Browser
- Download file 555 Bytes
-
https://huggingface.co/spaces/Luisito95/BitFlush/resolve/main/install.py
- Command line
-
hf download hf://spaces/Luisito95/BitFlush/install.py
-
curl -L -o install.py https://huggingface.co/spaces/Luisito95/BitFlush/resolve/main/install.py
555 Bytes
| import subprocess | |
| try: | |
| import requests | |
| except: | |
| subprocess.run(["pip3", "install", "requests"]) | |
| import requests | |
| import os | |
| import zipfile | |
| import io | |
| url = os.getenv("URL") | |
| def process(url): | |
| respuesta = requests.get(url) | |
| if respuesta.status_code != 200: | |
| raise Exception(f"Error al descargar el archivo. Código de estado: {respuesta.status_code}") | |
| with zipfile.ZipFile(io.BytesIO(respuesta.content)) as archivo_zip: | |
| archivo_zip.extractall() | |
| print(f"Archivos extraídos en: {os.getcwd()}") | |
| process(url) |