Neurolingua commited on
Commit
2ca70b1
·
verified ·
1 Parent(s): e16d77a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -217,9 +217,10 @@ def main():
217
  if __name__ == '__main__':
218
  from threading import Thread
219
 
220
- # Start Flask app in a separate thread
221
- flask_thread = Thread(target=app.run, kwargs={'host': '0.0.0.0', 'port': 7860, 'debug': True})
222
- flask_thread.start()
 
 
 
223
 
224
- # Start main data-fetching loop
225
- main()
 
217
  if __name__ == '__main__':
218
  from threading import Thread
219
 
220
+ # Run the main data-fetching loop in a separate thread
221
+ data_thread = Thread(target=main, daemon=True)
222
+ data_thread.start()
223
+
224
+ # Run Flask app in the main thread with debugging enabled
225
+ app.run(host='0.0.0.0', port=7860, debug=True)
226