Parishri07 commited on
Commit
18d7d72
Β·
verified Β·
1 Parent(s): 3c6ab3c

Update ui/suggestions_tab.py

Browse files
Files changed (1) hide show
  1. ui/suggestions_tab.py +27 -36
ui/suggestions_tab.py CHANGED
@@ -13,49 +13,46 @@ def create_suggestions_tab():
13
  elem_classes="centered-text"
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,
31
- interactive=False,
32
- show_copy_button=True,
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>
47
  .centered-text {
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
  }
60
  #suggestion-box textarea {
61
  font-family: 'Courier New', monospace;
@@ -63,13 +60,7 @@ def create_suggestions_tab():
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
  """
 
13
  elem_classes="centered-text"
14
  )
15
 
16
+ # 🟩 Input Section
17
+ suggestion_input = gr.Textbox(
18
+ label="πŸ’¬ Your Request",
19
+ placeholder="Try: Gifts under 500, or Shampoo for dry hair",
20
+ lines=1
21
+ )
22
+
23
+ # πŸ”˜ Add vertical spacing
24
+ gr.Markdown("<br>")
25
 
26
+ # 🟦 Button
27
+ suggest_btn = gr.Button("πŸ” Get Suggestions")
28
 
29
+ # πŸ”˜ Add vertical spacing
30
+ gr.Markdown("<br>")
31
+
32
+ # 🟨 Output Section
33
+ suggestions_output = gr.Textbox(
34
+ label="✨ Suggested Products",
35
+ lines=10,
36
+ interactive=False,
37
+ show_copy_button=True,
38
+ elem_id="suggestion-box"
39
+ )
40
 
41
+ # Logic
42
  suggest_btn.click(
43
  generate_product_description,
44
  inputs=suggestion_input,
45
  outputs=suggestions_output
46
  )
47
 
48
+ # Optional styling
49
  gr.Markdown(
50
  """
51
  <style>
52
  .centered-text {
53
  text-align: center;
54
+ font-size: 16px;
55
+ font-weight: 500;
 
 
 
 
 
 
 
 
56
  }
57
  #suggestion-box textarea {
58
  font-family: 'Courier New', monospace;
 
60
  background-color: #111827;
61
  color: #e5e7eb;
62
  border-radius: 10px;
63
+ padding: 10px;
 
 
 
 
 
 
64
  }
65
  </style>
66
  """