雷娃 commited on
Commit
5082b8d
·
1 Parent(s): 06a57b1

add install.sh

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -47,8 +47,8 @@ def respond(
47
  history: list[dict[str, str]],
48
  system_message,
49
  max_tokens,
50
- temperature,
51
- top_p
52
  ):
53
  """
54
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
@@ -80,8 +80,8 @@ def respond(
80
  model_inputs.update(
81
  dict(max_new_tokens=max_tokens,
82
  streamer = streamer,
83
- temperature = float(temperature),
84
- top_p = float(top_p),
85
  presence_penalty = 1.5,
86
  )
87
  )
@@ -112,14 +112,14 @@ chatbot = gr.ChatInterface(
112
  additional_inputs=[
113
  gr.Textbox(value="", label="System message"),
114
  gr.Slider(minimum=1, maximum=32000, value=512, step=1, label="Max new tokens"),
115
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
116
- gr.Slider(
117
- minimum=0.1,
118
- maximum=1.0,
119
- value=0.95,
120
- step=0.05,
121
- label="Top-p (nucleus sampling)",
122
- ),
123
  ],
124
  )
125
 
 
47
  history: list[dict[str, str]],
48
  system_message,
49
  max_tokens,
50
+ # temperature,
51
+ # top_p
52
  ):
53
  """
54
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
 
80
  model_inputs.update(
81
  dict(max_new_tokens=max_tokens,
82
  streamer = streamer,
83
+ temperature = 0.7,
84
+ top_p = 1,
85
  presence_penalty = 1.5,
86
  )
87
  )
 
112
  additional_inputs=[
113
  gr.Textbox(value="", label="System message"),
114
  gr.Slider(minimum=1, maximum=32000, value=512, step=1, label="Max new tokens"),
115
+ # gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
116
+ # gr.Slider(
117
+ # minimum=0.1,
118
+ # maximum=1.0,
119
+ # value=0.95,
120
+ # step=0.05,
121
+ # label="Top-p (nucleus sampling)",
122
+ # ),
123
  ],
124
  )
125