Update main.puy
Browse files
main.py
CHANGED
|
@@ -7,7 +7,6 @@ from datetime import datetime, timedelta
|
|
| 7 |
import smtplib
|
| 8 |
from email.mime.text import MIMEText
|
| 9 |
import jwt
|
| 10 |
-
from threading import Thread # Added for running Flask and client simultaneously
|
| 11 |
|
| 12 |
# --------------------------
|
| 13 |
# Config
|
|
@@ -295,20 +294,7 @@ def static_files(path):
|
|
| 295 |
return send_from_directory(".", path)
|
| 296 |
|
| 297 |
# --------------------------
|
| 298 |
-
# Run App
|
| 299 |
# --------------------------
|
| 300 |
if __name__ == "__main__":
|
| 301 |
-
|
| 302 |
-
app.run(host="0.0.0.0", port=7860)
|
| 303 |
-
|
| 304 |
-
flask_thread = Thread(target=run_flask)
|
| 305 |
-
flask_thread.start()
|
| 306 |
-
|
| 307 |
-
# Import and run client_chat
|
| 308 |
-
try:
|
| 309 |
-
from client_chat import run_client
|
| 310 |
-
run_client()
|
| 311 |
-
except ImportError:
|
| 312 |
-
print("client_chat.py not found. Flask server running without client.")
|
| 313 |
-
except Exception as e:
|
| 314 |
-
print("Error running client_chat:", e)
|
|
|
|
| 7 |
import smtplib
|
| 8 |
from email.mime.text import MIMEText
|
| 9 |
import jwt
|
|
|
|
| 10 |
|
| 11 |
# --------------------------
|
| 12 |
# Config
|
|
|
|
| 294 |
return send_from_directory(".", path)
|
| 295 |
|
| 296 |
# --------------------------
|
| 297 |
+
# Run App
|
| 298 |
# --------------------------
|
| 299 |
if __name__ == "__main__":
|
| 300 |
+
app.run(host="0.0.0.0", port=7860)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|