lucas-w commited on
Commit
a780e3c
β€’
1 Parent(s): 73a863b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -61,7 +61,8 @@ def givetext(input_text,lmodel,ltokenizer):
61
  with torch.no_grad():
62
  print("BEFORE RETURNING")
63
 
64
- return (ltokenizer.decode(lmodel.generate(**model_input, max_new_tokens=1000)[0], skip_special_tokens=True))
 
65
  #return (ltokenizer.decode(lmodel.generate(**model_input, max_new_tokens=100)[0], skip_special_tokens=True))
66
  except Exception as error:
67
  print("Exception {error}".format(error = error))
 
61
  with torch.no_grad():
62
  print("BEFORE RETURNING")
63
 
64
+ return (ltokenizer.decode(lmodel.generate(**model_input, max_new_tokens=1000, device="cpu")[0], skip_special_tokens=True))
65
+ #return (ltokenizer.decode(lmodel.generate(**model_input, max_new_tokens=1000)[0], skip_special_tokens=True))
66
  #return (ltokenizer.decode(lmodel.generate(**model_input, max_new_tokens=100)[0], skip_special_tokens=True))
67
  except Exception as error:
68
  print("Exception {error}".format(error = error))