-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_flask.py
More file actions
31 lines (28 loc) Β· 753 Bytes
/
Copy pathrun_flask.py
File metadata and controls
31 lines (28 loc) Β· 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python3
"""
Simple Flask server runner
"""
import sys
import os
from pathlib import Path
# Add src to path
sys.path.insert(0, str(Path(__file__).parent / "src"))
if __name__ == "__main__":
print("π Starting Intelligent Query PDF Q&A System...")
print("π Web Interface: http://localhost:3000")
print("π Press Ctrl+C to stop")
print("-" * 50)
try:
from src.web_app import app
app.run(
host='0.0.0.0',
port=3000,
debug=False,
threaded=True
)
except KeyboardInterrupt:
print("\nπ Server stopped by user")
except Exception as e:
print(f"β Error: {e}")
import traceback
traceback.print_exc()