Parishri07 commited on
Commit
6344741
·
verified ·
1 Parent(s): 85e6047

Update ui/suggestions_tab.py

Browse files
Files changed (1) hide show
  1. ui/suggestions_tab.py +31 -22
ui/suggestions_tab.py CHANGED
@@ -13,40 +13,45 @@ def create_suggestions_tab():
13
  elem_classes="centered-text"
14
  )
15
 
16
- # Input section
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=3
23
- )
24
- suggest_btn = gr.Button("🔍 Get Suggestions", scale=1)
25
 
26
- # Output box
27
- suggestions_output = gr.Textbox(
28
- label="✨ Suggested Products",
29
- lines=10,
30
- interactive=False,
31
- show_copy_button=True,
32
- elem_id="suggestion-box"
33
- )
34
 
35
- # Connect logic
36
  suggest_btn.click(
37
  generate_product_description,
38
  inputs=suggestion_input,
39
  outputs=suggestions_output
40
  )
41
 
42
- # Styling
43
  gr.Markdown(
44
  """
45
  <style>
46
  .centered-text {
47
  text-align: center;
48
- font-size: 16px;
49
- font-weight: 500;
 
 
 
 
 
 
 
 
50
  }
51
  #suggestion-box textarea {
52
  font-family: 'Courier New', monospace;
@@ -54,7 +59,11 @@ def create_suggestions_tab():
54
  background-color: #111827;
55
  color: #e5e7eb;
56
  border-radius: 10px;
57
- padding: 10px;
 
 
 
 
58
  }
59
  </style>
60
  """
 
13
  elem_classes="centered-text"
14
  )
15
 
16
+ with gr.Box(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,
29
+ interactive=False,
30
+ show_copy_button=True,
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>
43
  .centered-text {
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
  }
56
  #suggestion-box textarea {
57
  font-family: 'Courier New', monospace;
 
59
  background-color: #111827;
60
  color: #e5e7eb;
61
  border-radius: 10px;
62
+ padding: 12px;
63
+ }
64
+ button {
65
+ font-weight: bold;
66
+ font-size: 14px;
67
  }
68
  </style>
69
  """