Yhhxhfh commited on
Commit
fc968b1
1 Parent(s): e0f7998

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -125,7 +125,14 @@ iface = gr.Interface(
125
  live=False
126
  )
127
 
128
- @spaces.GPU()
 
 
 
 
 
 
 
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)