Spaces:
Sleeping
Sleeping
Commit
·
0f515d8
1
Parent(s):
f72a9c9
updates
Browse files- tinysql_model_demo.py +7 -8
tinysql_model_demo.py
CHANGED
|
@@ -125,14 +125,13 @@ def model_demo(shared_instruction, shared_schema):
|
|
| 125 |
with gr.Column(scale=2):
|
| 126 |
gr.Markdown("### Your Query")
|
| 127 |
|
| 128 |
-
# Query
|
| 129 |
-
instruction = gr.
|
| 130 |
label="Natural Language Query",
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
)
|
| 135 |
-
|
| 136 |
# Database schema as Code (SQL formatted)
|
| 137 |
schema = gr.Code(
|
| 138 |
label="Database Schema",
|
|
@@ -152,13 +151,13 @@ def model_demo(shared_instruction, shared_schema):
|
|
| 152 |
|
| 153 |
gr.Markdown("### Example Query")
|
| 154 |
|
| 155 |
-
# Custom example with query in
|
| 156 |
gr.HTML("""
|
| 157 |
<div style="background: #2A2A2A; border-radius: 12px; padding: 1.5rem; margin: 1rem 0; border: 1px solid #3A3A3A;">
|
| 158 |
<div style="margin-bottom: 0.75rem;">
|
| 159 |
<strong style="color: #FF6B4A;">Model:</strong> <span style="color: #D0D0D0;">BM2_CS2_Syn (0.5B)</span>
|
| 160 |
</div>
|
| 161 |
-
<div style="margin-bottom: 0.75rem;">
|
| 162 |
<strong style="color: #FF6B4A;">Query:</strong>
|
| 163 |
<pre style="background: #1A1A1A; padding: 0.75rem; border-radius: 6px; margin-top: 0.5rem; color: #D0D0D0; font-size: 0.85rem; line-height: 1.5;">List worker earnings from highest to lowest</pre>
|
| 164 |
</div>
|
|
|
|
| 125 |
with gr.Column(scale=2):
|
| 126 |
gr.Markdown("### Your Query")
|
| 127 |
|
| 128 |
+
# Query as Textbox styled like a code box
|
| 129 |
+
instruction = gr.Textbox(
|
| 130 |
label="Natural Language Query",
|
| 131 |
+
placeholder="e.g., Find all employees earning more than 50000 sorted by name",
|
| 132 |
+
lines=2,
|
| 133 |
+
value=""
|
| 134 |
)
|
|
|
|
| 135 |
# Database schema as Code (SQL formatted)
|
| 136 |
schema = gr.Code(
|
| 137 |
label="Database Schema",
|
|
|
|
| 151 |
|
| 152 |
gr.Markdown("### Example Query")
|
| 153 |
|
| 154 |
+
# Custom example with query in styled box
|
| 155 |
gr.HTML("""
|
| 156 |
<div style="background: #2A2A2A; border-radius: 12px; padding: 1.5rem; margin: 1rem 0; border: 1px solid #3A3A3A;">
|
| 157 |
<div style="margin-bottom: 0.75rem;">
|
| 158 |
<strong style="color: #FF6B4A;">Model:</strong> <span style="color: #D0D0D0;">BM2_CS2_Syn (0.5B)</span>
|
| 159 |
</div>
|
| 160 |
+
<div style="margin-bottom: 0.75rem;">
|
| 161 |
<strong style="color: #FF6B4A;">Query:</strong>
|
| 162 |
<pre style="background: #1A1A1A; padding: 0.75rem; border-radius: 6px; margin-top: 0.5rem; color: #D0D0D0; font-size: 0.85rem; line-height: 1.5;">List worker earnings from highest to lowest</pre>
|
| 163 |
</div>
|