Update app.py
Browse files
app.py
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def dummy_inventory_action(product, quantity):
|
| 4 |
+
return f"β
Product '{product}' with quantity {quantity} added to inventory."
|
| 5 |
+
|
| 6 |
+
with gr.Blocks(title="SETA Smart Inventory") as demo:
|
| 7 |
+
with gr.Row():
|
| 8 |
+
# Sidebar section
|
| 9 |
+
with gr.Column(scale=1, min_width=220):
|
| 10 |
+
gr.Image("placeholder-logo.png", label="Logo", show_label=False)
|
| 11 |
+
gr.Markdown("### π Navigation")
|
| 12 |
+
gr.Button("π Dashboard")
|
| 13 |
+
gr.Button("π¦ Inventory")
|
| 14 |
+
gr.Button("π Reports")
|
| 15 |
+
gr.Button("βοΈ Settings")
|
| 16 |
+
|
| 17 |
+
# Main content section
|
| 18 |
+
with gr.Column(scale=3):
|
| 19 |
+
gr.Markdown("## SETA Smart Inventory Dashboard")
|
| 20 |
+
gr.Markdown("Efficient inventory control for electrical trade associations.")
|
| 21 |
+
with gr.Row():
|
| 22 |
+
product = gr.Textbox(label="Product Name")
|
| 23 |
+
quantity = gr.Number(label="Quantity", value=1)
|
| 24 |
+
submit = gr.Button("Add to Inventory")
|
| 25 |
+
output = gr.Textbox(label="Status", interactive=False)
|
| 26 |
+
submit.click(fn=dummy_inventory_action, inputs=[product, quantity], outputs=output)
|
| 27 |
+
|
| 28 |
+
demo.launch()
|