shivam121215 commited on
Commit
47332b5
·
1 Parent(s): 2ac1550

update wsgi

Browse files
Files changed (2) hide show
  1. app.py +3 -0
  2. wsgi.py +3 -11
app.py CHANGED
@@ -105,6 +105,9 @@ def initialize_system():
105
  "congestion_risk": congestion_risk
106
  }
107
 
 
 
 
108
 
109
  @app.route('/api/status', methods=['GET'])
110
  def status():
 
105
  "congestion_risk": congestion_risk
106
  }
107
 
108
+ @app.route("/")
109
+ def home():
110
+ return "Flask is running!"
111
 
112
  @app.route('/api/status', methods=['GET'])
113
  def status():
wsgi.py CHANGED
@@ -1,18 +1,10 @@
1
  import os
2
  import sys
3
 
 
4
  if not os.path.exists('route_optimizer.py'):
5
  print("Error: route_optimizer.py file not found!")
6
- print("Please save your original code as 'route_optimizer.py' before running this application.")
7
  sys.exit(1)
8
- import app
9
 
10
- if __name__ == '__main__':
11
- print("Starting Route Optimization API Server...")
12
-
13
- from app import app, initialize_system
14
- print("Initializing route optimization system...")
15
- system = initialize_system()
16
- print(f"System initialized with {len(system['G'].nodes())} nodes and {len(system['G'].edges())} edges")
17
-
18
- app.run()
 
1
  import os
2
  import sys
3
 
4
+ # Ensure required file exists
5
  if not os.path.exists('route_optimizer.py'):
6
  print("Error: route_optimizer.py file not found!")
 
7
  sys.exit(1)
 
8
 
9
+ # Import only the Flask app instance (Gunicorn will use this)
10
+ from app import app