markrodrigo commited on
Commit ·
28b043e
1
Parent(s): 7d7c207
startup
Browse files
app.py
CHANGED
|
@@ -27,12 +27,15 @@ PRESET_EXAMPLES = [
|
|
| 27 |
"How far apart is the point and line? : 'Point(-109.87549823 38.60574249)' 'LineString(-109.24324628 38.76349931, -109.4821773 38.6875815)'"
|
| 28 |
]
|
| 29 |
|
| 30 |
-
# Overrides the gradient with a solid color
|
| 31 |
css_BTN_code = """
|
| 32 |
-
|
| 33 |
-
background-
|
| 34 |
-
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
}
|
| 37 |
"""
|
| 38 |
|
|
@@ -66,7 +69,7 @@ def respond(user_message, chat_history):
|
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
-
with gr.Blocks(title="Text to PostGIS Postgresql via Llama 3.2", theme=gr.themes.Ocean()) as demo:
|
| 70 |
gr.Markdown("# Natural Language to Spatial SQL.\n### Convert natural language and spatial primitives to PostGIS with Llama 3.2")
|
| 71 |
chatbot = gr.Chatbot(
|
| 72 |
label="Chat",
|
|
@@ -83,7 +86,7 @@ with gr.Blocks(title="Text to PostGIS Postgresql via Llama 3.2", theme=gr.themes
|
|
| 83 |
container=False
|
| 84 |
)
|
| 85 |
with gr.Column(scale=1, min_width=100):
|
| 86 |
-
submit_btn = gr.Button("Submit", variant="primary",
|
| 87 |
|
| 88 |
gr.Markdown("### Quick Examples")
|
| 89 |
gr.Examples(
|
|
|
|
| 27 |
"How far apart is the point and line? : 'Point(-109.87549823 38.60574249)' 'LineString(-109.24324628 38.76349931, -109.4821773 38.6875815)'"
|
| 28 |
]
|
| 29 |
|
|
|
|
| 30 |
css_BTN_code = """
|
| 31 |
+
#my-submit-btn {
|
| 32 |
+
background-color: #ff4500;
|
| 33 |
+
color: white;
|
| 34 |
+
font-weight: bold;
|
| 35 |
+
border-radius: 8px;
|
| 36 |
+
}
|
| 37 |
+
#my-submit-btn:hover {
|
| 38 |
+
background-color: #e63e00;
|
| 39 |
}
|
| 40 |
"""
|
| 41 |
|
|
|
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
+
with gr.Blocks(title="Text to PostGIS Postgresql via Llama 3.2", theme=gr.themes.Ocean(), css=css_BTN_code) as demo:
|
| 73 |
gr.Markdown("# Natural Language to Spatial SQL.\n### Convert natural language and spatial primitives to PostGIS with Llama 3.2")
|
| 74 |
chatbot = gr.Chatbot(
|
| 75 |
label="Chat",
|
|
|
|
| 86 |
container=False
|
| 87 |
)
|
| 88 |
with gr.Column(scale=1, min_width=100):
|
| 89 |
+
submit_btn = gr.Button("Submit", variant="primary", elem_id="my-submit-btn")
|
| 90 |
|
| 91 |
gr.Markdown("### Quick Examples")
|
| 92 |
gr.Examples(
|