binxu.wang commited on
Commit
ef210ec
1 Parent(s): 671920a

remove seeds

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -29,16 +29,16 @@ def generate(prompt, num_beams, max_length, repetition_penalty, seed):
29
  output_all = "\n\n".join(output_texts)
30
  return output_all
31
 
32
- examples = [["子曰", 10, 50, 1.5, 42],
33
- ["子墨子曰", 10, 50, 1.5, 42],
34
- ["孟子", 10, 50, 1.5, 42],
35
- ["秦王", 10, 50, 1.5, 42],
36
- ["子路问仁", 10, 50, 1.5, 42],
37
- ["孙行者笑道", 10, 50, 1.5, 42],
38
- ["牛魔王与红孩儿", 10, 50, 1.5, 42],
39
- ["鲲鹏", 10, 50, 1.5, 42],
40
- ["宝玉道", 10, 50, 1.5, 42],
41
- ["黛玉行至贾母处", 10, 50, 1.5, 42],]
42
 
43
 
44
  iface = gr.Interface(fn=generate,
@@ -46,7 +46,7 @@ iface = gr.Interface(fn=generate,
46
  gr.inputs.Slider(minimum=1, maximum=20, default=10, step=1, label="Number of beams"),
47
  gr.inputs.Slider(minimum=10, maximum=100, default=50, step=1, label="Max length"),
48
  gr.inputs.Slider(minimum=1, maximum=5, default=1.5, label="Repetition penalty"),
49
- gr.inputs.Number(default=0, label="Seed")],
50
  outputs=gr.outputs.Textbox(label="Generated Text"),
51
  examples=examples)
52
  iface.launch()
 
29
  output_all = "\n\n".join(output_texts)
30
  return output_all
31
 
32
+ examples = [["子曰", 10, 50, 1.5, ],
33
+ ["子墨子曰", 10, 50, 1.5, ],
34
+ ["孟子", 10, 50, 1.5, ],
35
+ ["秦王", 10, 50, 1.5, ],
36
+ ["子路问仁", 10, 50, 1.5, ],
37
+ ["孙行者笑道", 10, 50, 1.5, ],
38
+ ["牛魔王与红孩儿", 10, 50, 1.5, ],
39
+ ["鲲鹏", 10, 50, 1.5, ],
40
+ ["宝玉道", 10, 50, 1.5, ],
41
+ ["黛玉行至贾母处", 10, 50, 1.5, ],]
42
 
43
 
44
  iface = gr.Interface(fn=generate,
 
46
  gr.inputs.Slider(minimum=1, maximum=20, default=10, step=1, label="Number of beams"),
47
  gr.inputs.Slider(minimum=10, maximum=100, default=50, step=1, label="Max length"),
48
  gr.inputs.Slider(minimum=1, maximum=5, default=1.5, label="Repetition penalty"),
49
+ ],
50
  outputs=gr.outputs.Textbox(label="Generated Text"),
51
  examples=examples)
52
  iface.launch()