AhmadA82 commited on
Commit
f93dc62
·
verified ·
1 Parent(s): c77fdcb

add server status

Browse files
Files changed (2) hide show
  1. README.md +1 -0
  2. app.py +4 -0
README.md CHANGED
@@ -7,6 +7,7 @@ sdk: docker
7
  pinned: false
8
  license: apache-2.0
9
  short_description: Multi-level programmer with simple interface
 
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
7
  pinned: false
8
  license: apache-2.0
9
  short_description: Multi-level programmer with simple interface
10
+ app_port: 7860
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py CHANGED
@@ -92,3 +92,7 @@ def chat(req: ChatRequest):
92
 
93
  req.history.append([req.message, reply])
94
  return ChatResponse(response=reply, updated_history=req.history)
 
 
 
 
 
92
 
93
  req.history.append([req.message, reply])
94
  return ChatResponse(response=reply, updated_history=req.history)
95
+
96
+ @app.get("/")
97
+ def root():
98
+ return {"message": "الخادم يعمل", "status": "ok"}