Update app.py
This commit is contained in:
parent
85f3d2d553
commit
ed54557c50
2
app.py
2
app.py
|
@ -41,7 +41,7 @@ def predict(text,
|
||||||
else:
|
else:
|
||||||
prompt,inputs=inputs
|
prompt,inputs=inputs
|
||||||
begin_length = len(prompt)
|
begin_length = len(prompt)
|
||||||
|
torch.cuda.empty_cache()
|
||||||
input_ids = inputs["input_ids"].to(device)
|
input_ids = inputs["input_ids"].to(device)
|
||||||
|
|
||||||
with torch.no_grad():
|
with torch.no_grad():
|
||||||
|
|
Loading…
Reference in New Issue