lewtun HF staff commited on
Commit
b33cc95
1 Parent(s): 30dcff9

Bound temperature

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -70,9 +70,7 @@ def generate(instruction, temperature=0.8, max_new_tokens=128, top_p=0.95, top_k
70
  examples = [
71
  "How do I create an array in C++ of length 5 which contains all even numbers between 1 and 10?",
72
  "How can I sort a list in Python?",
73
- "How many helicopters can a human eat in one sitting?",
74
  "How can I write a Java function to generate the nth Fibonacci number?",
75
- "There's a lion in my garden. How can I get rid of it?"
76
  ]
77
 
78
 
@@ -117,7 +115,7 @@ with gr.Blocks(theme=theme, analytics_enabled=False) as demo:
117
  temperature = gr.Slider(
118
  label="Temperature",
119
  value=0.8,
120
- minimum=0.0,
121
  maximum=2.0,
122
  step=0.1,
123
  interactive=True,
@@ -155,4 +153,4 @@ with gr.Blocks(theme=theme, analytics_enabled=False) as demo:
155
  instruction.submit(generate, inputs=[instruction, temperature, max_new_tokens, top_p, top_k], outputs=[output])
156
 
157
  demo.queue(concurrency_count=1)
158
- demo.launch(enable_queue=True, share=True)
 
70
  examples = [
71
  "How do I create an array in C++ of length 5 which contains all even numbers between 1 and 10?",
72
  "How can I sort a list in Python?",
 
73
  "How can I write a Java function to generate the nth Fibonacci number?",
 
74
  ]
75
 
76
 
 
115
  temperature = gr.Slider(
116
  label="Temperature",
117
  value=0.8,
118
+ minimum=0.01,
119
  maximum=2.0,
120
  step=0.1,
121
  interactive=True,
 
153
  instruction.submit(generate, inputs=[instruction, temperature, max_new_tokens, top_p, top_k], outputs=[output])
154
 
155
  demo.queue(concurrency_count=1)
156
+ demo.launch(enable_queue=True)#, share=True)