Woziii commited on
Commit
95e9a91
1 Parent(s): 4d9d807

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -131,6 +131,12 @@ def post_process_response(response):
131
 
132
  return response.strip()
133
 
 
 
 
 
 
 
134
  @spaces.GPU(duration=120)
135
  def generate(
136
  message: str,
 
131
 
132
  return response.strip()
133
 
134
+ interaction_count = 0
135
+
136
+ def cleanup_memory():
137
+ gc.collect()
138
+ torch.cuda.empty_cache()
139
+
140
  @spaces.GPU(duration=120)
141
  def generate(
142
  message: str,