Nicolas Wagner commited on
Commit
e6f2097
·
1 Parent(s): 38308df
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -321,9 +321,10 @@ with demo:
321
  row_count=10,
322
  )
323
 
324
- scheduler = BackgroundScheduler()
325
- scheduler.add_job(restart_space, "interval", seconds=1800)
326
- scheduler.start()
327
- demo.queue(default_concurrency_limit=40).launch(
328
- allowed_paths=[background_image_path, logo_image_path],
329
- )
 
 
321
  row_count=10,
322
  )
323
 
324
+ if __name__ == "__main__":
325
+ scheduler = BackgroundScheduler()
326
+ scheduler.add_job(restart_space, "interval", seconds=1800)
327
+ scheduler.start()
328
+ demo.queue(default_concurrency_limit=40).launch(
329
+ allowed_paths=[background_image_path, logo_image_path],
330
+ )