BlinkDL commited on
Commit
f943f56
1 Parent(s): eee05f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -28,7 +28,7 @@ def infer(
28
  ctx,
29
  token_count=10,
30
  temperature=1.0,
31
- top_p=0.85,
32
  presencePenalty = 0.1,
33
  countPenalty = 0.1,
34
  ):
@@ -76,13 +76,14 @@ def infer(
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
- ["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
- ["Building a website can be done in 10 simple steps:\n1.", 100, 1.0, 0.85, 0.1, 0.1],
84
- ["I believe the meaning of life is", 100, 1.0, 0.85, 0.1, 0.1],
85
- ["Simply put, the theory of relativity states that", 100, 1.0, 0.85, 0.1, 0.1],
 
86
  ]
87
 
88
 
@@ -94,7 +95,7 @@ iface = gr.Interface(
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
  ],
 
28
  ctx,
29
  token_count=10,
30
  temperature=1.0,
31
+ top_p=0.8,
32
  presencePenalty = 0.1,
33
  countPenalty = 0.1,
34
  ):
 
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.8, 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.8, 0.1, 0.1],
81
+ ["Q & A\n\nQuestion:\nWhy is the sky blue?\n\nDetailed Expert Answer:\n", 100, 1.0, 0.8, 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.8, 0.1, 0.1],
83
+ ["Building a website can be done in 10 simple steps:\n1.", 100, 1.0, 0.8, 0.1, 0.1],
84
+ ["A Chinese phrase is provided: 百闻不如一见。\nThe masterful Chinese translator flawlessly translates the phrase into English:", 100, 1.0, 0.8, 0.1, 0.1],
85
+ ["I believe the meaning of life is", 100, 1.0, 0.8, 0.1, 0.1],
86
+ ["Simply put, the theory of relativity states that", 100, 1.0, 0.8, 0.1, 0.1],
87
  ]
88
 
89
 
 
95
  gr.Textbox(lines=14, label="Prompt"), # prompt
96
  gr.Slider(10, 200, step=10, value=100), # token_count
97
  gr.Slider(0.2, 2.0, step=0.1, value=1.0), # temperature
98
+ gr.Slider(0.0, 1.0, step=0.05, value=0.8), # top_p
99
  gr.Slider(0.0, 1.0, step=0.1, value=0.1), # presencePenalty
100
  gr.Slider(0.0, 1.0, step=0.1, value=0.1), # countPenalty
101
  ],