1Egyb commited on
Commit
e135859
·
verified ·
1 Parent(s): d73d334

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import os
2
  from fastapi import FastAPI, Request
3
  from fastapi.responses import JSONResponse, FileResponse
4
- from fastapi.staticfiles import StaticFiles
5
  from huggingface_hub import InferenceClient
6
 
7
  app = FastAPI()
@@ -10,14 +9,14 @@ HF_TOKEN = os.getenv("HF_TOKEN")
10
  MODEL_ID = "huihui-ai/Qwen2.5-72B-Instruct-abliterated"
11
  client = InferenceClient(token=HF_TOKEN)
12
 
13
- # ربط الملفات في المجلد الرئيسي
14
  @app.get("/")
15
  async def serve_index():
 
16
  return FileResponse("index.html")
17
 
18
- # ربط ملف الـ CSS الموجود فعلياً
19
  @app.get("/static/styles.css")
20
  async def serve_css():
 
21
  return FileResponse("styles.css")
22
 
23
  @app.post("/chat")
 
1
  import os
2
  from fastapi import FastAPI, Request
3
  from fastapi.responses import JSONResponse, FileResponse
 
4
  from huggingface_hub import InferenceClient
5
 
6
  app = FastAPI()
 
9
  MODEL_ID = "huihui-ai/Qwen2.5-72B-Instruct-abliterated"
10
  client = InferenceClient(token=HF_TOKEN)
11
 
 
12
  @app.get("/")
13
  async def serve_index():
14
+ # يبحث عن index.html في المجلد الرئيسي للـ Space
15
  return FileResponse("index.html")
16
 
 
17
  @app.get("/static/styles.css")
18
  async def serve_css():
19
+ # يبحث عن styles.css في المجلد الرئيسي
20
  return FileResponse("styles.css")
21
 
22
  @app.post("/chat")