Farid Karimli
commited on
Commit
·
35bc6a7
1
Parent(s):
ab2235c
Workflow target change and Dockerfile update
Browse files- .github/workflows/deploy_to_hf.yml +1 -1
- Dockerfile +1 -1
- apps/ai_tutor/app.py +9 -2
- apps/ai_tutor/public/favicon.ico +0 -0
.github/workflows/deploy_to_hf.yml
CHANGED
@@ -18,4 +18,4 @@ jobs:
|
|
18 |
- name: Deploy Production (main) to HuggingFace
|
19 |
env:
|
20 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
21 |
-
run: git push --force https://faridkarimli:[email protected]/spaces/
|
|
|
18 |
- name: Deploy Production (main) to HuggingFace
|
19 |
env:
|
20 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
21 |
+
run: git push --force https://faridkarimli:[email protected]/spaces/tools4ds/ai_tutor
|
Dockerfile
CHANGED
@@ -28,4 +28,4 @@ RUN --mount=type=secret,id=LITERAL_API_KEY_LOGGING,mode=0444,required=true
|
|
28 |
RUN --mount=type=secret,id=CHAINLIT_AUTH_SECRET,mode=0444,required=true
|
29 |
|
30 |
# Default command to run the application
|
31 |
-
CMD vectorstore_creator --config_file config/config.yml --project_config_file config/project_config.yml && python app.py
|
|
|
28 |
RUN --mount=type=secret,id=CHAINLIT_AUTH_SECRET,mode=0444,required=true
|
29 |
|
30 |
# Default command to run the application
|
31 |
+
CMD vectorstore_creator --config_file config/config.yml --project_config_file config/project_config.yml && python app.py --host 0.0.0.0 --port 7860
|
apps/ai_tutor/app.py
CHANGED
@@ -25,6 +25,9 @@ from edubotics_core.chat_processor.helpers import get_user_details, update_user_
|
|
25 |
from config.config_manager import config_manager
|
26 |
import hashlib
|
27 |
|
|
|
|
|
|
|
28 |
# set config
|
29 |
config = config_manager.get_config().dict()
|
30 |
|
@@ -385,6 +388,10 @@ async def get_tokens_left(request: Request):
|
|
385 |
mount_chainlit(app=app, target="chainlit_app.py", path=CHAINLIT_PATH)
|
386 |
|
387 |
if __name__ == "__main__":
|
388 |
-
|
|
|
|
|
|
|
|
|
389 |
|
390 |
-
uvicorn.run(app, host=
|
|
|
25 |
from config.config_manager import config_manager
|
26 |
import hashlib
|
27 |
|
28 |
+
import uvicorn
|
29 |
+
import argparse
|
30 |
+
|
31 |
# set config
|
32 |
config = config_manager.get_config().dict()
|
33 |
|
|
|
388 |
mount_chainlit(app=app, target="chainlit_app.py", path=CHAINLIT_PATH)
|
389 |
|
390 |
if __name__ == "__main__":
|
391 |
+
parser = argparse.ArgumentParser(description="Run the AI Tutor application")
|
392 |
+
parser.add_argument("--host", default="0.0.0.0", help="Host to run the server on")
|
393 |
+
parser.add_argument("--port", type=int, default=7860,
|
394 |
+
help="Port to run the server on")
|
395 |
+
args = parser.parse_args()
|
396 |
|
397 |
+
uvicorn.run(app, host=args.host, port=args.port)
|
apps/ai_tutor/public/favicon.ico
ADDED