Spaces:
Sleeping
Sleeping
Update components/place_order.py
Browse files14 unmodified lines1516171819202113 unmodified lines3536373814 unmodified linesorders = read_excel('data/orders.xlsx')order_id = str(uuid.uuid4())total_cost = sum(item["Price"] * item["Quantity"] for item in cart)new_order = {"Order ID": order_id,13 unmodified lineswith gr.Group():gr.Markdown("### Place Your Order")gr.Button("Place Order").click(place_order, outputs="Status")14 unmodified lines1516171819202113 unmodified lines35363738394014 unmodified linesorders = read_excel('data/orders.xlsx')order_id = str(uuid.uuid4())total_cost = sum(item.get("Price", 0) * item.get("Quantity", 1) for item in cart)new_order = {"Order ID": order_id,13 unmodified lineswith gr.Group():gr.Markdown("### Place Your Order")status_label = gr.Label(label="Order Status") # Use a Label for outputplace_order_button = gr.Button("Place Order")place_order_button.click(place_order, outputs=status_label)
components/place_order.py+4-2