Spaces:
Runtime error
Runtime error
Update app.py
Browse files264 unmodified lines2652662672682692702711 unmodified line273274275276277278279280281282264 unmodified linestry:# Now restart the spaceAPI.restart_space(repo_id=REPO_ID, token=HF_TOKEN)preload_gt()logging.info("Space restarted successfully.")except Exception as e:logging.error(f"Failed to restart space: {e}")1 unmodified line# if __name__ == "__main__":preload_gt()# run_gradio()scheduler = BackgroundScheduler()scheduler.add_job(restart_space, "interval", hours=2) # Restart every 1hlogging.info("Scheduler initialized to restart space every 1 hour.")scheduler.start()interface.launch(show_error=True)264 unmodified lines2652662672682692701 unmodified line272273274275276277278264 unmodified linestry:# Now restart the spaceAPI.restart_space(repo_id=REPO_ID, token=HF_TOKEN)logging.info("Space restarted successfully.")except Exception as e:logging.error(f"Failed to restart space: {e}")1 unmodified line# if __name__ == "__main__":preload_gt()scheduler = BackgroundScheduler()scheduler.add_job(restart_space, "interval", hours=5) # Restart every 5hsscheduler.start()interface.launch(show_error=True)
app.py+1-5