BlinkDL commited on
Commit
d9ddd86
1 Parent(s): 7302b3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -74,8 +74,8 @@ def infer(
74
  yield out_str.strip()
75
 
76
  examples = [
77
- ["Expert Questions & Helpful Answers\nAsk Research Experts\nQuestion:\nHow can we eliminate poverty?\n\nFull Answer:\n", 150, 1.0, 0.7, 0.1, 0.1],
78
- ["Here's a short cyberpunk sci-fi adventure story. The story's main character is an artificial human created by a company called OpenBot.\n\nThe Story:\n", 150, 1.0, 0.75, 0.1, 0.1],
79
  ['''Below is an instruction that describes a task. Write a response that appropriately completes the request.
80
 
81
  ### Instruction:
@@ -93,14 +93,14 @@ Arrange the given numbers in ascending order.
93
 
94
  ### Response:
95
  ''', 150, 1.0, 0.2, 0.5, 0.5],
96
- ["Ask Expert\n\nQuestion:\nWhat are some good plans for world peace?\n\nExpert Full Answer:\n", 150, 1.0, 0.7, 0.1, 0.1],
97
- ["Q & A\n\nQuestion:\nWhy is the sky blue?\n\nDetailed Expert Answer:\n", 150, 1.0, 0.7, 0.1, 0.1],
98
- ["Dear sir,\nI would like to express my boundless apologies for the recent nuclear war.", 150, 1.0, 0.7, 0.1, 0.1],
99
  ["Here is a shell script to find all .hpp files in /home/workspace and delete the 3th row string of these files:", 150, 1.0, 0.7, 0.1, 0.1],
100
- ["Building a website can be done in 10 simple steps:\n1.", 150, 1.0, 0.75, 0.1, 0.1],
101
- ["A Chinese phrase is provided: 百闻不如一见。\nThe masterful Chinese translator flawlessly translates the phrase into English:", 150, 1.0, 0.5, 0.1, 0.1],
102
- ["I believe the meaning of life is", 150, 1.0, 0.75, 0.1, 0.1],
103
- ["Simply put, the theory of relativity states that", 150, 1.0, 0.7, 0.1, 0.1],
104
  ]
105
 
106
 
@@ -112,9 +112,9 @@ iface = gr.Interface(
112
  gr.Textbox(lines=10, label="Prompt", value="Here's a short cyberpunk sci-fi adventure story. The story's main character is an artificial human created by a company called OpenBot.\n\nThe Story:\n"), # prompt
113
  gr.Slider(10, 200, step=10, value=150), # token_count
114
  gr.Slider(0.2, 2.0, step=0.1, value=1.0), # temperature
115
- gr.Slider(0.0, 1.0, step=0.05, value=0.75), # top_p
116
- gr.Slider(0.0, 1.0, step=0.1, value=0.1), # presencePenalty
117
- gr.Slider(0.0, 1.0, step=0.1, value=0.1), # countPenalty
118
  ],
119
  outputs=gr.Textbox(label="Generated Output", lines=28),
120
  examples=examples,
 
74
  yield out_str.strip()
75
 
76
  examples = [
77
+ ["Expert Questions & Helpful Answers\nAsk Research Experts\nQuestion:\nHow can we eliminate poverty?\n\nFull Answer:\n", 150, 1.0, 0.7, 0.2, 0.2],
78
+ ["Here's a short cyberpunk sci-fi adventure story. The story's main character is an artificial human created by a company called OpenBot.\n\nThe Story:\n", 150, 1.0, 0.7, 0.2, 0.2],
79
  ['''Below is an instruction that describes a task. Write a response that appropriately completes the request.
80
 
81
  ### Instruction:
 
93
 
94
  ### Response:
95
  ''', 150, 1.0, 0.2, 0.5, 0.5],
96
+ ["Ask Expert\n\nQuestion:\nWhat are some good plans for world peace?\n\nExpert Full Answer:\n", 150, 1.0, 0.7, 0.2, 0.2],
97
+ ["Q & A\n\nQuestion:\nWhy is the sky blue?\n\nDetailed Expert Answer:\n", 150, 1.0, 0.7, 0.2, 0.2],
98
+ ["Dear sir,\nI would like to express my boundless apologies for the recent nuclear war.", 150, 1.0, 0.7, 0.2, 0.2],
99
  ["Here is a shell script to find all .hpp files in /home/workspace and delete the 3th row string of these files:", 150, 1.0, 0.7, 0.1, 0.1],
100
+ ["Building a website can be done in 10 simple steps:\n1.", 150, 1.0, 0.7, 0.2, 0.2],
101
+ ["A Chinese phrase is provided: 百闻不如一见。\nThe masterful Chinese translator flawlessly translates the phrase into English:", 150, 1.0, 0.5, 0.2, 0.2],
102
+ ["I believe the meaning of life is", 150, 1.0, 0.7, 0.2, 0.2],
103
+ ["Simply put, the theory of relativity states that", 150, 1.0, 0.5, 0.2, 0.2],
104
  ]
105
 
106
 
 
112
  gr.Textbox(lines=10, label="Prompt", value="Here's a short cyberpunk sci-fi adventure story. The story's main character is an artificial human created by a company called OpenBot.\n\nThe Story:\n"), # prompt
113
  gr.Slider(10, 200, step=10, value=150), # token_count
114
  gr.Slider(0.2, 2.0, step=0.1, value=1.0), # temperature
115
+ gr.Slider(0.0, 1.0, step=0.05, value=0.7), # top_p
116
+ gr.Slider(0.0, 1.0, step=0.1, value=0.2), # presencePenalty
117
+ gr.Slider(0.0, 1.0, step=0.1, value=0.2), # countPenalty
118
  ],
119
  outputs=gr.Textbox(label="Generated Output", lines=28),
120
  examples=examples,