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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
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.75, 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.8, 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,12 +93,13 @@ 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.75, 0.1, 0.1],
97
- ["Q & A\n\nQuestion:\nWhy is the sky blue?\n\nDetailed Expert Answer:\n", 150, 1.0, 0.75, 0.1, 0.1],
 
98
  ["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],
99
- ["Building a website can be done in 10 simple steps:\n1.", 150, 1.0, 0.8, 0.1, 0.1],
100
  ["A Chinese phrase is provided: 百闻不如一见。\nThe masterful Chinese translator flawlessly translates the phrase into English:", 150, 1.0, 0.5, 0.1, 0.1],
101
- ["I believe the meaning of life is", 150, 1.0, 0.8, 0.1, 0.1],
102
  ["Simply put, the theory of relativity states that", 150, 1.0, 0.7, 0.1, 0.1],
103
  ]
104
 
@@ -111,7 +112,7 @@ iface = gr.Interface(
111
  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
112
  gr.Slider(10, 200, step=10, value=150), # token_count
113
  gr.Slider(0.2, 2.0, step=0.1, value=1.0), # temperature
114
- gr.Slider(0.0, 1.0, step=0.05, value=0.8), # top_p
115
  gr.Slider(0.0, 1.0, step=0.1, value=0.1), # presencePenalty
116
  gr.Slider(0.0, 1.0, step=0.1, value=0.1), # countPenalty
117
  ],
 
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
 
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
 
 
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
  ],