Spaces:
Runtime error
Runtime error
Download app.py from Starlucas0201/VideoGeneration1: direct link, hf CLI and curl.
- Browser
- Download file 955 Bytes
-
https://huggingface.co/spaces/Starlucas0201/VideoGeneration1/resolve/main/app.py
- Command line
-
hf download hf://spaces/Starlucas0201/VideoGeneration1/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Starlucas0201/VideoGeneration1/resolve/main/app.py
955 Bytes
| import os | |
| import zipfile | |
| import sys | |
| ZIP_NAME = "musicnbrain.zip" | |
| MARKER = ".unzipped_ok" | |
| def unzip_once(): | |
| print("Starting unzip script...") | |
| if not os.path.exists(ZIP_NAME): | |
| print(f"'{ZIP_NAME}' not found — nothing to unzip.") | |
| return | |
| if os.path.exists(MARKER): | |
| print("Already unzipped. Skipping.") | |
| return | |
| try: | |
| with zipfile.ZipFile(ZIP_NAME, "r") as zf: | |
| print(f"Extracting {ZIP_NAME}...") | |
| zf.extractall(".") | |
| print("Extraction complete.") | |
| os.remove(ZIP_NAME) | |
| print("Deleted zip file.") | |
| open(MARKER, "w").close() | |
| print("Created marker file.") | |
| print("\nExtracted files:") | |
| for root, dirs, files in os.walk("."): | |
| for file in files: | |
| print(os.path.join(root, file)) | |
| except Exception as e: | |
| print("Unzip failed:", e) | |
| if __name__ == "__main__": | |
| unzip_once() | |
| sys.exit(0) | |