Spaces:
Sleeping
Sleeping
Download src/study_chatbot/__init__.py from hassan-ak/study-chatbot: direct link, hf CLI and curl.
- Browser
- Download file 463 Bytes
-
https://huggingface.co/spaces/hassan-ak/study-chatbot/resolve/main/src/study_chatbot/__init__.py
- Command line
-
hf download hf://spaces/hassan-ak/study-chatbot/src/study_chatbot/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/hassan-ak/study-chatbot/resolve/main/src/study_chatbot/__init__.py
463 Bytes
| # src/study_chatbot/__init__.py | |
| import os, sys, subprocess | |
| from pathlib import Path | |
| def main(): | |
| # Resolve path to app.py inside the package | |
| entry = Path(__file__).parent / "app.py" | |
| subprocess.check_call( | |
| [ | |
| sys.executable, | |
| "-m", | |
| "chainlit", | |
| "run", | |
| str(entry), | |
| "--host", | |
| "0.0.0.0", | |
| "--port", | |
| os.getenv("PORT", "8000"), | |
| ] | |
| ) | |