Update app.py
Browse files
app.py
CHANGED
|
@@ -434,12 +434,22 @@ with gr.Blocks(
|
|
| 434 |
Plan a route to see the map</p></div></div>"""
|
| 435 |
)
|
| 436 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 437 |
def reset_before_new_query():
|
| 438 |
-
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
|
| 442 |
-
|
|
|
|
|
|
|
|
|
|
| 443 |
|
| 444 |
submit_btn.click(
|
| 445 |
fn=reset_before_new_query,
|
|
|
|
| 434 |
Plan a route to see the map</p></div></div>"""
|
| 435 |
)
|
| 436 |
|
| 437 |
+
# def reset_before_new_query():
|
| 438 |
+
# """Show loading state while processing"""
|
| 439 |
+
# return (
|
| 440 |
+
# "<div style='padding:40px; text-align:center; color:#757575; background:#fafafa; border-radius:10px; min-height:300px;'>Processing new request...</div>",
|
| 441 |
+
# "<div style='padding:40px; text-align:center; color:#757575; background:#fafafa; border-radius:10px; min-height:300px;'>Loading new map...</div>",
|
| 442 |
+
# )
|
| 443 |
+
|
| 444 |
def reset_before_new_query():
|
| 445 |
+
"""Show loading state while processing"""
|
| 446 |
+
loading_html = """
|
| 447 |
+
<div style='padding:40px; text-align:center; background:#fafafa; border-radius:10px; min-height:300px; display:flex; flex-direction:column; align-items:center; justify-content:center;'>
|
| 448 |
+
<div class='loading-spinner'></div>
|
| 449 |
+
<p style='margin-top:20px; color:#757575; font-size:1.1em;'>Processing your request...</p>
|
| 450 |
+
</div>
|
| 451 |
+
"""
|
| 452 |
+
return (loading_html, loading_html)
|
| 453 |
|
| 454 |
submit_btn.click(
|
| 455 |
fn=reset_before_new_query,
|