| import os | |
| import sys | |
| from pathlib import Path | |
| sys.path.insert(0, str(Path(__file__).resolve().parent / "src")) | |
| from compliment_forest.server import create_app | |
| app = create_app() | |
| if os.getenv("SPACE_ID"): | |
| app.launch(show_error=True) | |
| elif __name__ == "__main__": | |
| app.launch(server_name="0.0.0.0", server_port=7860) | |