Tonic commited on
Commit
664a2c2
·
1 Parent(s): 03c59e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -65,10 +65,10 @@ class StarlingBot:
65
  response_text = tokenizer.decode(response[0], skip_special_tokens=True)
66
  # response_text = response.split("<|assistant|>\n")[-1]
67
  return response_text
68
- finally:
69
- del input_ids, attention_mask, output_ids
70
- gc.collect()
71
- torch.cuda.empty_cache()
72
 
73
  starling_bot = StarlingBot()
74
 
 
65
  response_text = tokenizer.decode(response[0], skip_special_tokens=True)
66
  # response_text = response.split("<|assistant|>\n")[-1]
67
  return response_text
68
+ finally:
69
+ del input_ids, attention_mask, output_ids
70
+ gc.collect()
71
+ torch.cuda.empty_cache()
72
 
73
  starling_bot = StarlingBot()
74