File size: 876 Bytes
0a2924f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/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()