richardr1126 commited on
Commit
a01503d
·
1 Parent(s): 941a95a
Files changed (1) hide show
  1. app-ngrok.py +2 -2
app-ngrok.py CHANGED
@@ -67,7 +67,7 @@ def format(text):
67
 
68
  return final_query_markdown
69
 
70
- def generate(input_message: str, db_info="", temperature=0.1, top_p=0.9, top_k=0, repetition_penalty=1.08, format_sql=True, stop_sequence="###", log=False):
71
  # Format the user's input message
72
  messages = f"Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: {input_message} {db_info}\n\n### Response:\n\n"
73
 
@@ -130,7 +130,7 @@ with gr.Blocks(theme='gradio/soft') as demo:
130
  db_info = gr.Textbox(lines=4, placeholder='Example: | table_01 : column_01 , column_02 | table_02 : column_01 , column_02 | ...', label='Database Info')
131
 
132
  with gr.Accordion("Options", open=False):
133
- temperature = gr.Slider(label="Temperature", minimum=0.0, maximum=1.0, value=0.5, step=0.1)
134
  top_p = gr.Slider(label="Top-p (nucleus sampling)", minimum=0.0, maximum=1.0, value=0.9, step=0.01)
135
  top_k = gr.Slider(label="Top-k", minimum=0, maximum=200, value=0, step=1)
136
  repetition_penalty = gr.Slider(label="Repetition Penalty", minimum=1.0, maximum=2.0, value=1.08, step=0.01)
 
67
 
68
  return final_query_markdown
69
 
70
+ def generate(input_message: str, db_info="", temperature=0.2, top_p=0.9, top_k=0, repetition_penalty=1.08, format_sql=True, stop_sequence="###", log=False):
71
  # Format the user's input message
72
  messages = f"Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: {input_message} {db_info}\n\n### Response:\n\n"
73
 
 
130
  db_info = gr.Textbox(lines=4, placeholder='Example: | table_01 : column_01 , column_02 | table_02 : column_01 , column_02 | ...', label='Database Info')
131
 
132
  with gr.Accordion("Options", open=False):
133
+ temperature = gr.Slider(label="Temperature", minimum=0.0, maximum=1.0, value=0.2, step=0.1)
134
  top_p = gr.Slider(label="Top-p (nucleus sampling)", minimum=0.0, maximum=1.0, value=0.9, step=0.01)
135
  top_k = gr.Slider(label="Top-k", minimum=0, maximum=200, value=0, step=1)
136
  repetition_penalty = gr.Slider(label="Repetition Penalty", minimum=1.0, maximum=2.0, value=1.08, step=0.01)