understanding commited on
Commit
6b41852
·
verified ·
1 Parent(s): da2296b

Create bot/fake_site.py

Browse files
Files changed (1) hide show
  1. bot/fake_site.py +17 -0
bot/fake_site.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from quart import Quart
2
+
3
+ app = Quart(__name__)
4
+
5
+ # A boring JSON response that looks like a System API
6
+ @app.route('/')
7
+ async def home():
8
+ return {
9
+ "status": "operational",
10
+ "system": "v1.4.2",
11
+ "load": "stable",
12
+ "message": "System is running normally."
13
+ }, 200
14
+
15
+ def run_fake_server():
16
+ # Run on Port 7860 to satisfy Hugging Face requirements
17
+ app.run(host='0.0.0.0', port=7860)