alialhaddad commited on
Commit
3a67ddc
·
verified ·
1 Parent(s): 9491655

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -6
app.py CHANGED
@@ -57,9 +57,9 @@ def respond(
57
 
58
  # 🔒 Force deterministic behavior
59
  generation_kwargs = {
60
- "max_tokens": int(max_tokens),
61
- "temperature": 0.2, # fixed LOW temperature
62
- "top_p": 0.8,
63
  "stream": True,
64
  }
65
 
@@ -80,9 +80,18 @@ def respond(
80
  chatbot = gr.ChatInterface(
81
  respond,
82
  additional_inputs=[
83
- gr.Textbox(value="You are a senior coding assistant.", label="System message"),
84
- gr.Slider(1, 2048, value=512, step=1, label="Max new tokens"),
85
- gr.Slider(0.1, 1.0, value=0.95, step=0.05, label="Top-p"),
 
 
 
 
 
 
 
 
 
86
  ],
87
  )
88
 
 
57
 
58
  # 🔒 Force deterministic behavior
59
  generation_kwargs = {
60
+ "max_tokens": 1024,
61
+ "temperature": 0.15, # fixed LOW temperature
62
+ "top_p": 0.9,
63
  "stream": True,
64
  }
65
 
 
80
  chatbot = gr.ChatInterface(
81
  respond,
82
  additional_inputs=[
83
+ gr.Textbox(
84
+ value=(
85
+ "You are a senior-level SQL debugging expert with deep mastery of PostgreSQL and Amazon Redshift. "
86
+ "You specialize in diagnosing complex query issues such as fan-out joins, incorrect aggregations, "
87
+ "CTE misusage, window function errors, and performance bottlenecks. "
88
+ "You always reason step-by-step, identify root causes, and propose production-safe fixes. "
89
+ "When relevant, you explain execution behavior in Redshift (distribution styles, sort keys, "
90
+ "query planning implications). You also provide optimized rewrites of queries and clearly "
91
+ "highlight the difference between the broken and fixed versions."
92
+ ),
93
+ label="System message",
94
+ ),
95
  ],
96
  )
97