Parishri07 commited on
Commit
f4d6cf1
·
verified ·
1 Parent(s): f0891a2

Update ui/suggestions_tab.py

Browse files
Files changed (1) hide show
  1. ui/suggestions_tab.py +17 -11
ui/suggestions_tab.py CHANGED
@@ -14,15 +14,17 @@ def create_suggestions_tab():
14
  )
15
 
16
  with gr.Group(elem_id="suggestion-form-box"):
17
- with gr.Row():
18
- suggestion_input = gr.Textbox(
19
- label="💬 Your Request",
20
- placeholder="Try: Gifts under 500, or Shampoo for dry hair",
21
- lines=1,
22
- scale=4
23
- )
24
- suggest_btn = gr.Button("🔍 Get Suggestions", scale=1)
 
25
 
 
26
  suggestions_output = gr.Textbox(
27
  label="✨ Suggested Products",
28
  lines=10,
@@ -31,12 +33,14 @@ def create_suggestions_tab():
31
  elem_id="suggestion-box"
32
  )
33
 
 
34
  suggest_btn.click(
35
  generate_product_description,
36
  inputs=suggestion_input,
37
  outputs=suggestions_output
38
  )
39
 
 
40
  gr.Markdown(
41
  """
42
  <style>
@@ -44,12 +48,12 @@ def create_suggestions_tab():
44
  text-align: center;
45
  font-size: 18px;
46
  font-weight: 600;
 
47
  }
48
  #suggestion-form-box {
49
- margin-top: 15px;
50
  border: 1px solid #333;
51
  border-radius: 12px;
52
- padding: 20px;
53
  background: #1c1c1c;
54
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
55
  }
@@ -59,11 +63,13 @@ def create_suggestions_tab():
59
  background-color: #111827;
60
  color: #e5e7eb;
61
  border-radius: 10px;
62
- padding: 30px;
63
  }
64
  button {
65
  font-weight: bold;
66
  font-size: 14px;
 
 
67
  }
68
  </style>
69
  """
 
14
  )
15
 
16
  with gr.Group(elem_id="suggestion-form-box"):
17
+ # Text input field
18
+ suggestion_input = gr.Textbox(
19
+ label="💬 Your Request",
20
+ placeholder="Try: Gifts under 500, or Shampoo for dry hair",
21
+ lines=1
22
+ )
23
+
24
+ # Submit button
25
+ suggest_btn = gr.Button("🔍 Get Suggestions")
26
 
27
+ # Output textbox
28
  suggestions_output = gr.Textbox(
29
  label="✨ Suggested Products",
30
  lines=10,
 
33
  elem_id="suggestion-box"
34
  )
35
 
36
+ # Button click logic
37
  suggest_btn.click(
38
  generate_product_description,
39
  inputs=suggestion_input,
40
  outputs=suggestions_output
41
  )
42
 
43
+ # Custom styling
44
  gr.Markdown(
45
  """
46
  <style>
 
48
  text-align: center;
49
  font-size: 18px;
50
  font-weight: 600;
51
+ margin-bottom: 16px;
52
  }
53
  #suggestion-form-box {
 
54
  border: 1px solid #333;
55
  border-radius: 12px;
56
+ padding: 24px;
57
  background: #1c1c1c;
58
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
59
  }
 
63
  background-color: #111827;
64
  color: #e5e7eb;
65
  border-radius: 10px;
66
+ padding: 12px;
67
  }
68
  button {
69
  font-weight: bold;
70
  font-size: 14px;
71
+ margin-top: 12px;
72
+ width: 100%;
73
  }
74
  </style>
75
  """