Di Zhang commited on
Commit
3411728
·
verified ·
1 Parent(s): b95bbb4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -46,7 +46,7 @@ def generate_text(message, history, max_tokens=512, temperature=0.9, top_p=0.95)
46
  input_texts = [input_text.replace('<|end_of_text|>','') for input_text in input_texts]
47
  #print(f"input_texts[0]: {input_texts[0]}")
48
  inputs = model.tokenize(input_texts[0].encode('utf-8'))
49
- tokens = model.generate(inputs, top_p=top_p, temp=temperature):
50
  #print(f"token: {token}")
51
  texts = model.detokenize(tokens,special=True)
52
  #print(f"text detok: {text}")
 
46
  input_texts = [input_text.replace('<|end_of_text|>','') for input_text in input_texts]
47
  #print(f"input_texts[0]: {input_texts[0]}")
48
  inputs = model.tokenize(input_texts[0].encode('utf-8'))
49
+ tokens = model.generate(inputs, top_p=top_p, temp=temperature)
50
  #print(f"token: {token}")
51
  texts = model.detokenize(tokens,special=True)
52
  #print(f"text detok: {text}")