Spaces:
Sleeping
Sleeping
Download replace_app.py from stephansolncev/TORUS: direct link, hf CLI and curl.
- Browser
- Download file 876 Bytes
-
https://huggingface.co/spaces/stephansolncev/TORUS/resolve/main/replace_app.py
- Command line
-
hf download hf://spaces/stephansolncev/TORUS/replace_app.py
-
curl -L -o replace_app.py https://huggingface.co/spaces/stephansolncev/TORUS/resolve/main/replace_app.py
876 Bytes
| #!/usr/bin/env python3 | |
| """ | |
| Script to replace the problematic app.py with working version | |
| """ | |
| import shutil | |
| import os | |
| def replace_app(): | |
| """Replace app.py with working version""" | |
| try: | |
| # Backup original | |
| if os.path.exists("app.py"): | |
| shutil.copy("app.py", "app_backup.py") | |
| print("✅ Original app.py backed up as app_backup.py") | |
| # Copy working version | |
| shutil.copy("app_working.py", "app.py") | |
| print("✅ app.py replaced with working version") | |
| print("\n=== HF Space Ready ===") | |
| print("The Hugging Face Space should now work without schema errors.") | |
| print("You can manually copy app_working.py to app.py in your HF Space repository.") | |
| except Exception as e: | |
| print(f"❌ Error replacing app.py: {e}") | |
| if __name__ == "__main__": | |
| replace_app() |