theostos commited on
Commit
a65b38c
·
1 Parent(s): ec25fc2
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -36,10 +36,10 @@ def respond(
36
  model_inputs = generate_custom_mask(tokenizer, [prompt], device)
37
 
38
  outputs = model.generate(temperature=0.7, max_tokens=32, **model_inputs)
39
- # outputs = outputs[:, model_inputs['input_ids'].shape[1]:]
40
  result = tokenizer.batch_decode(outputs, skip_special_tokens=True)
41
 
42
- return "test"
43
 
44
  """
45
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
 
36
  model_inputs = generate_custom_mask(tokenizer, [prompt], device)
37
 
38
  outputs = model.generate(temperature=0.7, max_tokens=32, **model_inputs)
39
+ outputs = outputs[:, model_inputs['input_ids'].shape[1]:]
40
  result = tokenizer.batch_decode(outputs, skip_special_tokens=True)
41
 
42
+ return result
43
 
44
  """
45
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface