nanova commited on
Commit
77d21ca
·
1 Parent(s): 1f1d286
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -69,8 +69,8 @@ def respond(
69
  if 'choices' in json_response and len(json_response['choices']) > 0:
70
  content = json_response['choices'][0].get('message', {}).get('content', '')
71
  if content:
72
- if '<think>' in content and '</think>' in content:
73
- content = content.split('</think>')[-1].strip()
74
  print(f"[INFO] response: {content}")
75
  return content
76
  return "Service temporarily unavailable"
@@ -87,11 +87,11 @@ demo = gr.ChatInterface(
87
  additional_inputs=[
88
  gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
89
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
90
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
91
  gr.Slider(
92
  minimum=0.1,
93
  maximum=1.0,
94
- value=0.96,
95
  step=0.05,
96
  label="Top-p (nucleus sampling)",
97
  ),
 
69
  if 'choices' in json_response and len(json_response['choices']) > 0:
70
  content = json_response['choices'][0].get('message', {}).get('content', '')
71
  if content:
72
+ # if '<think>' in content and '</think>' in content:
73
+ # content = content.split('</think>')[-1].strip()
74
  print(f"[INFO] response: {content}")
75
  return content
76
  return "Service temporarily unavailable"
 
87
  additional_inputs=[
88
  gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
89
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
90
+ gr.Slider(minimum=0.1, maximum=4.0, value=0.6, step=0.1, label="Temperature"),
91
  gr.Slider(
92
  minimum=0.1,
93
  maximum=1.0,
94
+ value=0.95,
95
  step=0.05,
96
  label="Top-p (nucleus sampling)",
97
  ),