BlinkDL commited on
Commit
c87c557
1 Parent(s): 63ac209

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -74,15 +74,15 @@ 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", 100, 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", 100, 1.0, 0.8, 0.1, 0.1],
79
- ["Ask Expert\n\nQuestion:\nWhat are some good plans for world peace?\n\nExpert Full Answer:\n", 100, 1.0, 0.75, 0.1, 0.1],
80
- ["Q & A\n\nQuestion:\nWhy is the sky blue?\n\nDetailed Expert Answer:\n", 100, 1.0, 0.75, 0.1, 0.1],
81
- ["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.7, 0.1, 0.1],
82
- ["Building a website can be done in 10 simple steps:\n1.", 100, 1.0, 0.8, 0.1, 0.1],
83
- ["A Chinese phrase is provided: 百闻不如一见。\nThe masterful Chinese translator flawlessly translates the phrase into English:", 100, 1.0, 0.5, 0.1, 0.1],
84
- ["I believe the meaning of life is", 100, 1.0, 0.8, 0.1, 0.1],
85
- ["Simply put, the theory of relativity states that", 100, 1.0, 0.7, 0.1, 0.1],
86
  ]
87
 
88
 
@@ -92,7 +92,7 @@ iface = gr.Interface(
92
  allow_flagging="never",
93
  inputs=[
94
  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
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.8), # top_p
98
  gr.Slider(0.0, 1.0, step=0.1, value=0.1), # presencePenalty
@@ -108,5 +108,5 @@ demo = gr.TabbedInterface(
108
  title=title,
109
  )
110
 
111
- demo.queue()
112
  demo.launch(share=False)
 
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
+ ["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],
80
+ ["Q & A\n\nQuestion:\nWhy is the sky blue?\n\nDetailed Expert Answer:\n", 150, 1.0, 0.75, 0.1, 0.1],
81
+ ["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],
82
+ ["Building a website can be done in 10 simple steps:\n1.", 150, 1.0, 0.8, 0.1, 0.1],
83
+ ["A Chinese phrase is provided: 百闻不如一见。\nThe masterful Chinese translator flawlessly translates the phrase into English:", 150, 1.0, 0.5, 0.1, 0.1],
84
+ ["I believe the meaning of life is", 150, 1.0, 0.8, 0.1, 0.1],
85
+ ["Simply put, the theory of relativity states that", 150, 1.0, 0.7, 0.1, 0.1],
86
  ]
87
 
88
 
 
92
  allow_flagging="never",
93
  inputs=[
94
  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
95
+ gr.Slider(10, 200, step=10, value=150), # 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.8), # top_p
98
  gr.Slider(0.0, 1.0, step=0.1, value=0.1), # presencePenalty
 
108
  title=title,
109
  )
110
 
111
+ demo.queue(max_size=10)
112
  demo.launch(share=False)