Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -125,7 +125,14 @@ iface = gr.Interface(
|
|
125 |
live=False
|
126 |
)
|
127 |
|
128 |
-
@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
if __name__ == "__main__":
|
130 |
port = int(os.environ.get("PORT", 7860))
|
131 |
iface.launch(server_port=port)
|
|
|
125 |
live=False
|
126 |
)
|
127 |
|
128 |
+
@app.on_event("startup")
|
129 |
+
async def startup_event():
|
130 |
+
pass
|
131 |
+
|
132 |
+
@app.on_event("shutdown")
|
133 |
+
async def shutdown_event():
|
134 |
+
gc.collect()
|
135 |
+
|
136 |
if __name__ == "__main__":
|
137 |
port = int(os.environ.get("PORT", 7860))
|
138 |
iface.launch(server_port=port)
|