BlinkDL commited on
Commit
80b71b0
1 Parent(s): ea2eccb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -76,11 +76,13 @@ def infer(
76
  yield out_str.strip()
77
 
78
  examples = [
 
79
  ["Ask Expert\n\nQuestion:\nWhat are some good plans for world peace?\n\nExpert Full Answer:\n", 100, 1.0, 0.85, 0.1, 0.1],
80
  ["Q & A\n\nQuestion:\nWhy is the sky blue?\n\nDetailed Expert Answer:\n", 100, 1.0, 0.85, 0.1, 0.1],
81
- ["Expert Questions & Helpful Answers\nAsk Research Experts\nQuestion:\nHow can we eliminate poverty?\n\nFull Answer:\n", 100, 1.0, 0.85, 0.1, 0.1],
82
  ["Here is a shell script to find all .hpp files in /home/workspace and delete the 3th row string of these files:", 100, 1.0, 0.85, 0.1, 0.1],
83
- ["List of penguin facts:\n1.", 100, 1.0, 0.85, 0.1, 0.1]
 
84
  ]
85
 
86
 
@@ -89,14 +91,14 @@ iface = gr.Interface(
89
  description=f'''{desc}''',
90
  allow_flagging="never",
91
  inputs=[
92
- gr.Textbox(lines=20, label="Prompt"), # prompt
93
  gr.Slider(10, 200, step=10, value=100), # token_count
94
  gr.Slider(0.2, 2.0, step=0.1, value=1.0), # temperature
95
  gr.Slider(0.0, 1.0, step=0.05, value=0.85), # top_p
96
  gr.Slider(0.0, 1.0, step=0.1, value=0.1), # presencePenalty
97
  gr.Slider(0.0, 1.0, step=0.1, value=0.1), # countPenalty
98
  ],
99
- outputs=gr.Textbox(label="Generated Output", lines=35),
100
  examples=examples,
101
  cache_examples=False,
102
  ).queue()
 
76
  yield out_str.strip()
77
 
78
  examples = [
79
+ ["Expert Questions & Helpful Answers\nAsk Research Experts\nQuestion:\nHow can we eliminate poverty?\n\nFull Answer:\n", 100, 1.0, 0.85, 0.1, 0.1],
80
  ["Ask Expert\n\nQuestion:\nWhat are some good plans for world peace?\n\nExpert Full Answer:\n", 100, 1.0, 0.85, 0.1, 0.1],
81
  ["Q & A\n\nQuestion:\nWhy is the sky blue?\n\nDetailed Expert Answer:\n", 100, 1.0, 0.85, 0.1, 0.1],
82
+ ["Simply put, the theory of relativity states that", 100, 1.0, 0.85, 0.1, 0.1],
83
  ["Here is a shell script to find all .hpp files in /home/workspace and delete the 3th row string of these files:", 100, 1.0, 0.85, 0.1, 0.1],
84
+ ["Building a website can be done in 10 simple steps:\n1.", 100, 1.0, 0.85, 0.1, 0.1],
85
+ ["I believe the meaning of life is", 100, 1.0, 0.85, 0.1, 0.1],
86
  ]
87
 
88
 
 
91
  description=f'''{desc}''',
92
  allow_flagging="never",
93
  inputs=[
94
+ gr.Textbox(lines=14, label="Prompt"), # prompt
95
  gr.Slider(10, 200, step=10, value=100), # token_count
96
  gr.Slider(0.2, 2.0, step=0.1, value=1.0), # temperature
97
  gr.Slider(0.0, 1.0, step=0.05, value=0.85), # top_p
98
  gr.Slider(0.0, 1.0, step=0.1, value=0.1), # presencePenalty
99
  gr.Slider(0.0, 1.0, step=0.1, value=0.1), # countPenalty
100
  ],
101
+ outputs=gr.Textbox(label="Generated Output", lines=30),
102
  examples=examples,
103
  cache_examples=False,
104
  ).queue()