ybelkada commited on
Commit
fec2ae2
·
verified ·
1 Parent(s): 5059236

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -106,7 +106,7 @@ def stream_chat(
106
  message: str,
107
  history: list,
108
  model_name: str,
109
- temperature: float = 0.7,
110
  max_new_tokens: int = 1024,
111
  top_p: float = 1.0,
112
  top_k: int = 20,
@@ -195,7 +195,7 @@ with gr.Blocks(css=CSS, theme="soft") as demo:
195
 
196
  # Parameters in accordion similar to second code
197
  with gr.Accordion("⚙️ Parameters", open=False, elem_classes="accordion"):
198
- temperature = gr.Slider(minimum=0, maximum=1, value=0.7, step=0.05, label="Temperature", info="Higher values produce more diverse outputs")
199
  max_new_tokens = gr.Slider(minimum=64, maximum=4096*8, value=1024, step=64, label="Max new tokens", info="Maximum length of generated response")
200
  top_p = gr.Slider(minimum=0, maximum=1, value=1.0, step=0.05, label="top_p", info="1.0 means no filtering")
201
  top_k = gr.Slider(minimum=1, maximum=20, step=1, value=20, label="top_k")
 
106
  message: str,
107
  history: list,
108
  model_name: str,
109
+ temperature: float = 0.1,
110
  max_new_tokens: int = 1024,
111
  top_p: float = 1.0,
112
  top_k: int = 20,
 
195
 
196
  # Parameters in accordion similar to second code
197
  with gr.Accordion("⚙️ Parameters", open=False, elem_classes="accordion"):
198
+ temperature = gr.Slider(minimum=0, maximum=1, value=0.1, step=0.05, label="Temperature", info="Higher values produce more diverse outputs")
199
  max_new_tokens = gr.Slider(minimum=64, maximum=4096*8, value=1024, step=64, label="Max new tokens", info="Maximum length of generated response")
200
  top_p = gr.Slider(minimum=0, maximum=1, value=1.0, step=0.05, label="top_p", info="1.0 means no filtering")
201
  top_k = gr.Slider(minimum=1, maximum=20, step=1, value=20, label="top_k")