Spaces:
Runtime error
Runtime error
project-baize
commited on
Commit
•
ed54557
1
Parent(s):
85f3d2d
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def predict(text,
|
|
41 |
else:
|
42 |
prompt,inputs=inputs
|
43 |
begin_length = len(prompt)
|
44 |
-
|
45 |
input_ids = inputs["input_ids"].to(device)
|
46 |
|
47 |
with torch.no_grad():
|
|
|
41 |
else:
|
42 |
prompt,inputs=inputs
|
43 |
begin_length = len(prompt)
|
44 |
+
torch.cuda.empty_cache()
|
45 |
input_ids = inputs["input_ids"].to(device)
|
46 |
|
47 |
with torch.no_grad():
|