EXp2 / app.py
SuriRaja's picture
Update app.py
6871e3e verified
import gradio as gr
def dummy_inventory_action(product, quantity):
return f"βœ… Product '{product}' with quantity {quantity} added to inventory."
with gr.Blocks(title="SETA Smart Inventory") as demo:
with gr.Row():
# Sidebar section
with gr.Column(scale=1, min_width=220):
gr.Image("placeholder-logo.png", label="Logo", show_label=False)
gr.Markdown("### πŸ“‹ Navigation")
gr.Button("🏠 Dashboard")
gr.Button("πŸ“¦ Inventory")
gr.Button("πŸ“Š Reports")
gr.Button("βš™οΈ Settings")
# Main content section
with gr.Column(scale=3):
gr.Markdown("## SETA Smart Inventory Dashboard")
gr.Markdown("Efficient inventory control for electrical trade associations.")
with gr.Row():
product = gr.Textbox(label="Product Name")
quantity = gr.Number(label="Quantity", value=1)
submit = gr.Button("Add to Inventory")
output = gr.Textbox(label="Status", interactive=False)
submit.click(fn=dummy_inventory_action, inputs=[product, quantity], outputs=output)
demo.launch()