Create web_interface.py
Browse files- web_interface.py +25 -0
web_interface.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from flask import Flask
|
| 2 |
+
import threading
|
| 3 |
+
import time
|
| 4 |
+
|
| 5 |
+
app = Flask(__name__)
|
| 6 |
+
|
| 7 |
+
@app.route('/')
|
| 8 |
+
def home():
|
| 9 |
+
return '''
|
| 10 |
+
<html>
|
| 11 |
+
<head><title>Ultroid Status</title></head>
|
| 12 |
+
<body>
|
| 13 |
+
<h1>π€ Ultroid Userbot</h1>
|
| 14 |
+
<p>Status: Running on Hugging Face Spaces</p>
|
| 15 |
+
<p>Bot is active in the background!</p>
|
| 16 |
+
</body>
|
| 17 |
+
</html>
|
| 18 |
+
'''
|
| 19 |
+
|
| 20 |
+
@app.route('/status')
|
| 21 |
+
def status():
|
| 22 |
+
return {"status": "running", "message": "Ultroid is active"}
|
| 23 |
+
|
| 24 |
+
if __name__ == '__main__':
|
| 25 |
+
app.run(host='0.0.0.0', port=7860)
|