Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -317,7 +317,7 @@ def handle_submit(brief, city, season, budget, ev_type, date, venue,
|
|
| 317 |
if "error" in recs or _gen_backend == "none":
|
| 318 |
msg = (recs.get("error", "") or
|
| 319 |
"Add HF_TOKEN as a Space Secret to enable document generation.")
|
| 320 |
-
return vendor_md, msg, msg
|
| 321 |
|
| 322 |
selected, targets = {}, []
|
| 323 |
for cat in VENDOR_CATEGORIES:
|
|
@@ -348,7 +348,7 @@ def handle_submit(brief, city, season, budget, ev_type, date, venue,
|
|
| 348 |
f" TO : {t['name']}\n BUDGET: ${t['alloc']:,.0f}\n{'β'*54}\n\n"
|
| 349 |
+ txt + "\n"
|
| 350 |
)
|
| 351 |
-
return vendor_md, ros, "\n\n".join(blocks)
|
| 352 |
|
| 353 |
|
| 354 |
def _qs(idx):
|
|
@@ -356,8 +356,8 @@ def _qs(idx):
|
|
| 356 |
b, c, s, bu = q["brief"], q["city"], q["season"], q["budget"]
|
| 357 |
et, dt, vn = q["type"], q["date"], q["venue"]
|
| 358 |
gs, nt = q["guests"], q["notes"]
|
| 359 |
-
vm, ros, rfps
|
| 360 |
-
return b, c, s, bu, et, dt, vn, gs, nt, vm, ros, rfps
|
| 361 |
|
| 362 |
# ================================================================
|
| 363 |
# CSS β WARM BROWN / CREAM / BEIGE PALETTE
|
|
@@ -480,7 +480,7 @@ with gr.Blocks(css=CSS, theme=gr.themes.Base(), title="ProSync AI") as demo:
|
|
| 480 |
""")
|
| 481 |
gr.HTML(f'<div class="status-bar">System Β· {_status}</div>')
|
| 482 |
|
| 483 |
-
with gr.Tabs(
|
| 484 |
|
| 485 |
# ββ STEP 1 ββββββββββββββββββββββββββββββββββββββββββββ
|
| 486 |
with gr.Tab("π Step 1 β Event Brief", id=0):
|
|
@@ -567,7 +567,7 @@ with gr.Blocks(css=CSS, theme=gr.themes.Base(), title="ProSync AI") as demo:
|
|
| 567 |
|
| 568 |
# ββ Wiring ββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 569 |
_in = [brief, city, season, budget, ev_type, date, venue, guests, notes]
|
| 570 |
-
_out = [vendor_out, ros_out, rfp_out
|
| 571 |
_form = [brief, city, season, budget, ev_type, date, venue, guests, notes]
|
| 572 |
|
| 573 |
submit.click(fn=handle_submit, inputs=_in, outputs=_out)
|
|
|
|
| 317 |
if "error" in recs or _gen_backend == "none":
|
| 318 |
msg = (recs.get("error", "") or
|
| 319 |
"Add HF_TOKEN as a Space Secret to enable document generation.")
|
| 320 |
+
return vendor_md, msg, msg
|
| 321 |
|
| 322 |
selected, targets = {}, []
|
| 323 |
for cat in VENDOR_CATEGORIES:
|
|
|
|
| 348 |
f" TO : {t['name']}\n BUDGET: ${t['alloc']:,.0f}\n{'β'*54}\n\n"
|
| 349 |
+ txt + "\n"
|
| 350 |
)
|
| 351 |
+
return vendor_md, ros, "\n\n".join(blocks)
|
| 352 |
|
| 353 |
|
| 354 |
def _qs(idx):
|
|
|
|
| 356 |
b, c, s, bu = q["brief"], q["city"], q["season"], q["budget"]
|
| 357 |
et, dt, vn = q["type"], q["date"], q["venue"]
|
| 358 |
gs, nt = q["guests"], q["notes"]
|
| 359 |
+
vm, ros, rfps = handle_submit(b, c, s, bu, et, dt, vn, gs, nt)
|
| 360 |
+
return b, c, s, bu, et, dt, vn, gs, nt, vm, ros, rfps
|
| 361 |
|
| 362 |
# ================================================================
|
| 363 |
# CSS β WARM BROWN / CREAM / BEIGE PALETTE
|
|
|
|
| 480 |
""")
|
| 481 |
gr.HTML(f'<div class="status-bar">System Β· {_status}</div>')
|
| 482 |
|
| 483 |
+
with gr.Tabs() as tabs:
|
| 484 |
|
| 485 |
# ββ STEP 1 ββββββββββββββββββββββββββββββββββββββββββββ
|
| 486 |
with gr.Tab("π Step 1 β Event Brief", id=0):
|
|
|
|
| 567 |
|
| 568 |
# ββ Wiring ββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 569 |
_in = [brief, city, season, budget, ev_type, date, venue, guests, notes]
|
| 570 |
+
_out = [vendor_out, ros_out, rfp_out]
|
| 571 |
_form = [brief, city, season, budget, ev_type, date, venue, guests, notes]
|
| 572 |
|
| 573 |
submit.click(fn=handle_submit, inputs=_in, outputs=_out)
|