| import os | |
| import sys | |
| # Compute the path to 'Source Code' and add it to sys.path | |
| source_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "Source Code") | |
| sys.path.insert(0, source_dir) | |
| # Change the current working directory to 'Source Code' so relative files like style.css are found | |
| os.chdir(source_dir) | |
| # Import the main app logic | |
| # In Source Code/app.py, the launch() method is automatically called | |
| # when 'on_huggingspace' is True. Simply importing it triggers the deployment. | |
| import app | |