piimaila commited on
Commit
1a56177
1 Parent(s): 8ee4ade

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,7 @@ model = AutoModelForCausalLM.from_pretrained(model_name)
11
  # 定义生成文本的函数
12
  def generate_text(input_text):
13
  inputs = tokenizer(input_text, return_tensors="pt")
14
- outputs = model.generate(**inputs, max_length=8192)
15
  generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
16
  return generated_text
17
 
 
11
  # 定义生成文本的函数
12
  def generate_text(input_text):
13
  inputs = tokenizer(input_text, return_tensors="pt")
14
+ outputs = model.generate(**inputs, max_length=200)
15
  generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
16
  return generated_text
17