Update app.py
Browse files
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,
|