Spaces:
Runtime error
Runtime error
Download api/index.py from HAK-16/physai-backend: direct link, hf CLI and curl.
- Browser
- Download file 357 Bytes
-
https://huggingface.co/spaces/HAK-16/physai-backend/resolve/main/api/index.py
- Command line
-
hf download hf://spaces/HAK-16/physai-backend/api/index.py
-
curl -L -o index.py https://huggingface.co/spaces/HAK-16/physai-backend/resolve/main/api/index.py
357 Bytes
| import os | |
| import sys | |
| # Get the directory of this file (api) | |
| current_dir = os.path.dirname(os.path.abspath(__file__)) | |
| # Get the parent directory (project root) | |
| parent_dir = os.path.dirname(current_dir) | |
| # Get the src directory | |
| src_dir = os.path.join(parent_dir, 'src') | |
| # Add src to sys.path | |
| sys.path.append(src_dir) | |
| # Import the app | |
| from src.main import app |