mzltest commited on
Commit
3aaa709
1 Parent(s): 18b6863

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -5,7 +5,7 @@ import subprocess
5
  def generate_text(length, prefix, temperature,topk,topp,rep):
6
  # 构建命令行参数
7
  my_prefix = "--prefix=" + prefix + ","
8
- args = ["python", "generate.py", f"--length={int(length)}", f"--nsamples=1", f"--prefix={prefix}", f"--temperature={temperature}",f"--batch_size=1",f"--topk={int(topk)}",f"--topp={topp}",f"--repetition_penalty={rep}","--fast_pattern","--segment","--tokenizer_path=./vocab_seg.txt"]
9
 
10
  # 执行命令并获取输出
11
  process = subprocess.Popen(args, stdout=subprocess.PIPE)
 
5
  def generate_text(length, prefix, temperature,topk,topp,rep):
6
  # 构建命令行参数
7
  my_prefix = "--prefix=" + prefix + ","
8
+ args = ["python", "generate.py", f"--length={int(length)}", f"--nsamples=1", f"--prefix={prefix}", f"--temperature={temperature}",f"--batch_size=1",f"--topk={int(topk)}",f"--topp={topp}",f"--repetition_penalty={rep}","--fast_pattern","--tokenizer_path=./vocab.txt","--config_path=./config.json"]
9
 
10
  # 执行命令并获取输出
11
  process = subprocess.Popen(args, stdout=subprocess.PIPE)