jdoexbox360 commited on
Commit
94f5c4a
1 Parent(s): dce8c82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -16,7 +16,7 @@ def output(prompt):
16
  input_ids = tokenizer.encode(sentence, return_tensors='pt')
17
  # generate text until the output length (which includes the context length) reaches 50
18
  output = model.generate(input_ids, max_length=50, num_beams=5, no_repeat_ngram_size=2, early_stopping=True)
19
- convo = tokenizer.decode(output[0], skip_special_tokens=True))
20
 
21
  iface = gr.Interface(fn=output, inputs="text", outputs="text")
22
  iface.launch()
 
16
  input_ids = tokenizer.encode(sentence, return_tensors='pt')
17
  # generate text until the output length (which includes the context length) reaches 50
18
  output = model.generate(input_ids, max_length=50, num_beams=5, no_repeat_ngram_size=2, early_stopping=True)
19
+ convo = tokenizer.decode(output[0], skip_special_tokens=True)
20
 
21
  iface = gr.Interface(fn=output, inputs="text", outputs="text")
22
  iface.launch()