entropy25 commited on
Commit
8aa94a5
Β·
verified Β·
1 Parent(s): 26bac0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -8
app.py CHANGED
@@ -274,7 +274,9 @@ def create_sample_cards():
274
  {"title": "Smartphone Case", "brand": "ProtectMax", "desc": "Durable protection case for latest smartphones", "score": 0.89},
275
  {"title": "Running Shoes", "brand": "SportFit", "desc": "Comfortable running shoes for daily exercise", "score": 0.87},
276
  {"title": "Coffee Machine", "brand": "BrewMaster", "desc": "Automatic coffee machine with multiple settings", "score": 0.84},
277
- {"title": "Laptop Stand", "brand": "DeskPro", "desc": "Adjustable aluminum laptop stand for ergonomic work", "score": 0.82}
 
 
278
  ]
279
 
280
  cards_html = "<h3>Recommended Products</h3><div style='display: flex; flex-wrap: wrap; gap: 20px; justify-content: center;'>"
@@ -316,13 +318,6 @@ with gr.Blocks(title="Product Search", theme=gr.themes.Soft()) as demo:
316
  with gr.Column(scale=1):
317
  init_btn = gr.Button("πŸš€ Initialize System", variant="primary", size="lg")
318
  status = gr.Textbox(label="System Status", lines=2, interactive=False, value="Click to initialize...")
319
-
320
- gr.Markdown("### Quick Search")
321
- quick_searches = ["bluetooth headphones", "gaming keyboard", "phone case", "running shoes"]
322
- quick_btn1 = gr.Button(quick_searches[0], size="sm")
323
- quick_btn2 = gr.Button(quick_searches[1], size="sm")
324
- quick_btn3 = gr.Button(quick_searches[2], size="sm")
325
- quick_btn4 = gr.Button(quick_searches[3], size="sm")
326
 
327
  with gr.Column(scale=3):
328
  search_input = gr.Textbox(
@@ -345,6 +340,14 @@ with gr.Blocks(title="Product Search", theme=gr.themes.Soft()) as demo:
345
  )
346
 
347
  search_btn = gr.Button("πŸ” Search", variant="primary", size="lg")
 
 
 
 
 
 
 
 
348
 
349
  # Results display
350
  results_display = gr.HTML(value=create_sample_cards())
 
274
  {"title": "Smartphone Case", "brand": "ProtectMax", "desc": "Durable protection case for latest smartphones", "score": 0.89},
275
  {"title": "Running Shoes", "brand": "SportFit", "desc": "Comfortable running shoes for daily exercise", "score": 0.87},
276
  {"title": "Coffee Machine", "brand": "BrewMaster", "desc": "Automatic coffee machine with multiple settings", "score": 0.84},
277
+ {"title": "Laptop Stand", "brand": "DeskPro", "desc": "Adjustable aluminum laptop stand for ergonomic work", "score": 0.82},
278
+ {"title": "Wireless Mouse", "brand": "ClickPro", "desc": "Ergonomic wireless mouse with precision tracking", "score": 0.80},
279
+ {"title": "USB-C Hub", "brand": "ConnectMax", "desc": "Multi-port USB-C hub with 4K HDMI output", "score": 0.78}
280
  ]
281
 
282
  cards_html = "<h3>Recommended Products</h3><div style='display: flex; flex-wrap: wrap; gap: 20px; justify-content: center;'>"
 
318
  with gr.Column(scale=1):
319
  init_btn = gr.Button("πŸš€ Initialize System", variant="primary", size="lg")
320
  status = gr.Textbox(label="System Status", lines=2, interactive=False, value="Click to initialize...")
 
 
 
 
 
 
 
321
 
322
  with gr.Column(scale=3):
323
  search_input = gr.Textbox(
 
340
  )
341
 
342
  search_btn = gr.Button("πŸ” Search", variant="primary", size="lg")
343
+
344
+ gr.Markdown("### Quick Search")
345
+ with gr.Row():
346
+ quick_searches = ["bluetooth headphones", "gaming keyboard", "phone case", "running shoes"]
347
+ quick_btn1 = gr.Button(quick_searches[0], size="sm")
348
+ quick_btn2 = gr.Button(quick_searches[1], size="sm")
349
+ quick_btn3 = gr.Button(quick_searches[2], size="sm")
350
+ quick_btn4 = gr.Button(quick_searches[3], size="sm")
351
 
352
  # Results display
353
  results_display = gr.HTML(value=create_sample_cards())