rombodawg commited on
Commit
7ef7c53
·
verified ·
1 Parent(s): 44eec21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -18,9 +18,8 @@ class StopOnTokens(StoppingCriteria):
18
  for stop_id in stop_ids:
19
  if input_ids[0][-1] == stop_id:
20
  return True
21
- return
22
- False
23
-
24
  @spaces.GPU(duration=195)
25
  def predict(message, history, temperature, max_tokens, top_p, top_k):
26
  history_transformer_format = history + [[message, ""]]
 
18
  for stop_id in stop_ids:
19
  if input_ids[0][-1] == stop_id:
20
  return True
21
+ return False
22
+ model.to('cuda')
 
23
  @spaces.GPU(duration=195)
24
  def predict(message, history, temperature, max_tokens, top_p, top_k):
25
  history_transformer_format = history + [[message, ""]]