richardr1126 commited on
Commit
ef53845
1 Parent(s): f667674
Files changed (2) hide show
  1. README.md +1 -1
  2. app-kobold.py → app-ngrok.py +2 -2
README.md CHANGED
@@ -5,7 +5,7 @@ colorFrom: gray
5
  colorTo: purple
6
  sdk: gradio
7
  sdk_version: 3.37.0
8
- app_file: app-kobold.py
9
  pinned: true
10
  license: bigcode-openrail-m
11
  ---
 
5
  colorTo: purple
6
  sdk: gradio
7
  sdk_version: 3.37.0
8
+ app_file: app-ngrok.py
9
  pinned: true
10
  license: bigcode-openrail-m
11
  ---
app-kobold.py → app-ngrok.py RENAMED
@@ -24,7 +24,7 @@ def format(text):
24
  return final_query_markdown
25
 
26
 
27
- def bot(input_message: str, db_info="", temperature=0.1, top_p=0.9, top_k=0, repetition_penalty=1.08):
28
  # Format the user's input message
29
  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"
30
 
@@ -73,7 +73,7 @@ with gr.Blocks(theme='gradio/soft') as demo:
73
  db_info = gr.Textbox(lines=4, placeholder='Example: | table_01 : column_01 , column_02 | table_02 : column_01 , column_02 | ...', label='Database Info')
74
 
75
  with gr.Accordion("Hyperparameters", open=False):
76
- temperature = gr.Slider(label="Temperature", minimum=0.0, maximum=1.0, value=0.5, step=0.1)
77
  top_p = gr.Slider(label="Top-p (nucleus sampling)", minimum=0.0, maximum=1.0, value=0.9, step=0.01)
78
  top_k = gr.Slider(label="Top-k", minimum=0, maximum=200, value=0, step=1)
79
  repetition_penalty = gr.Slider(label="Repetition Penalty", minimum=1.0, maximum=2.0, value=1.08, step=0.01)
 
24
  return final_query_markdown
25
 
26
 
27
+ def bot(input_message: str, db_info="", temperature=0.3, top_p=0.9, top_k=0, repetition_penalty=1.08):
28
  # Format the user's input message
29
  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"
30
 
 
73
  db_info = gr.Textbox(lines=4, placeholder='Example: | table_01 : column_01 , column_02 | table_02 : column_01 , column_02 | ...', label='Database Info')
74
 
75
  with gr.Accordion("Hyperparameters", open=False):
76
+ temperature = gr.Slider(label="Temperature", minimum=0.0, maximum=1.0, value=0.3, step=0.1)
77
  top_p = gr.Slider(label="Top-p (nucleus sampling)", minimum=0.0, maximum=1.0, value=0.9, step=0.01)
78
  top_k = gr.Slider(label="Top-k", minimum=0, maximum=200, value=0, step=1)
79
  repetition_penalty = gr.Slider(label="Repetition Penalty", minimum=1.0, maximum=2.0, value=1.08, step=0.01)