Gyr0MAN commited on
Commit
07699f8
1 Parent(s): 8c1406b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -26,8 +26,7 @@ def generate_text(inp, history):
26
  input_ids = tokenizer(inp, return_tensors='pt').to("cuda")
27
  beam_output = model.generate(**input_ids, generation_config=generation_config)
28
  output = tokenizer.decode(beam_output[0], skip_special_token=True)
29
- output = output.replace(inp,"")
30
- print(output)
31
  return output
32
 
33
  gr.ChatInterface(generate_text).launch()
 
26
  input_ids = tokenizer(inp, return_tensors='pt').to("cuda")
27
  beam_output = model.generate(**input_ids, generation_config=generation_config)
28
  output = tokenizer.decode(beam_output[0], skip_special_token=True)
29
+ output = output.replace(inp,"").replace("<s>","").replace("</s>","")
 
30
  return output
31
 
32
  gr.ChatInterface(generate_text).launch()