ecyht2 commited on
Commit
be7c0a9
1 Parent(s): ecae120

fix: Fix crash when generating

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -56,7 +56,7 @@ def generate(
56
  logging.debug("Prompt: %s", formatted_prompt)
57
 
58
  logging.info("Generating Text")
59
- stream = model.generate(tokenizer(prompt, return_tensors="pt"), **generate_kwargs)
60
 
61
  logging.info("Creating Output")
62
  output = ""
 
56
  logging.debug("Prompt: %s", formatted_prompt)
57
 
58
  logging.info("Generating Text")
59
+ stream = model.generate(tokenizer(prompt, return_tensors="pt").input_ids, **generate_kwargs)
60
 
61
  logging.info("Creating Output")
62
  output = ""