omar0scarf commited on
Commit
e655ddc
·
1 Parent(s): 8c3254f

ضافة الملفات والتحديثات الخاصة بتطبيق UI-TARS-7B-DPO

Browse files
Files changed (3) hide show
  1. __pycache__/app.cpython-311.pyc +0 -0
  2. app.py +2 -1
  3. static/index.html +11 -0
__pycache__/app.cpython-311.pyc ADDED
Binary file (6.25 kB). View file
 
app.py CHANGED
@@ -7,6 +7,7 @@ import torch
7
  import base64
8
  import io
9
  import os
 
10
 
11
  app = FastAPI(docs_url="/docs", redoc_url="/redoc", openapi_url="/openapi.json")
12
 
@@ -103,7 +104,7 @@ async def chat_completion(request: ChatCompletionRequest = Body(...)):
103
 
104
  @app.get("/")
105
  def index():
106
- return {"message": "مرحباً بكم في واجهة API الخاصة بـ UI-TARS-7B-DPO. استخدم /chat/completions لإرسال الطلبات."}
107
 
108
  @app.on_event("startup")
109
  def startup_event():
 
7
  import base64
8
  import io
9
  import os
10
+ from starlette.responses import FileResponse
11
 
12
  app = FastAPI(docs_url="/docs", redoc_url="/redoc", openapi_url="/openapi.json")
13
 
 
104
 
105
  @app.get("/")
106
  def index():
107
+ return FileResponse("static/index.html")
108
 
109
  @app.on_event("startup")
110
  def startup_event():
static/index.html ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>API UI-TARS 7B DPO</title>
6
+ </head>
7
+ <body>
8
+ <h1>مرحباً بكم في واجهة API الخاصة بـ UI-TARS-7B-DPO</h1>
9
+ <p>يمكنكم زيارة <a href="/docs">توثيق الواجهة (Swagger UI)</a> للاطلاع على تفاصيل الـ API.</p>
10
+ </body>
11
+ </html>