Spaces:
Sleeping
Sleeping
| import os | |
| import shutil | |
| # Backup the original app.py | |
| if os.path.exists('app.py'): | |
| print("Backing up original app.py to app.py.bak") | |
| shutil.copy('app.py', 'app.py.bak') | |
| # Copy the fixed version to app.py | |
| if os.path.exists('app_fixed.py'): | |
| print("Replacing app.py with fixed version") | |
| shutil.copy('app_fixed.py', 'app.py') | |
| print("Done! The app.py file has been updated.") | |
| else: | |
| print("Error: app_fixed.py not found!") |