Parishri07 commited on
Commit
7276ec0
Β·
verified Β·
1 Parent(s): af37595

Update ui/suggestions_tab.py

Browse files
Files changed (1) hide show
  1. ui/suggestions_tab.py +24 -5
ui/suggestions_tab.py CHANGED
@@ -6,8 +6,7 @@ def create_suggestions_tab():
6
  # πŸ”· Header
7
  gr.Markdown(
8
  """
9
- ## πŸ€– Ask RetailGenie for Recommendations
10
-
11
  🧞 Just type your need β€” e.g., _"shampoo for dry hair under 500"_, _"gift sets"_, or _"budget skin care"_
12
  and let Genie do the rest!
13
  """,
@@ -21,13 +20,11 @@ def create_suggestions_tab():
21
  lines=1
22
  )
23
 
24
- # πŸ”˜ Add vertical spacing
25
  gr.Markdown("<div style='margin-top: 8px;'></div>")
26
 
27
  # 🟦 Button
28
  suggest_btn = gr.Button("πŸ” Get Suggestions")
29
 
30
- # πŸ”˜ Add vertical spacing
31
  gr.Markdown("<div style='margin-top: 12px;'></div>")
32
 
33
  # 🟨 Output Section
@@ -41,7 +38,29 @@ def create_suggestions_tab():
41
 
42
  # 🧠 Connect logic to FLAN model
43
  suggest_btn.click(
44
- generate_product_description,
45
  inputs=suggestion_input,
46
  outputs=suggestions_output
47
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  # πŸ”· Header
7
  gr.Markdown(
8
  """
9
+ ## πŸ€– Ask RetailGenie for Recommendations
 
10
  🧞 Just type your need β€” e.g., _"shampoo for dry hair under 500"_, _"gift sets"_, or _"budget skin care"_
11
  and let Genie do the rest!
12
  """,
 
20
  lines=1
21
  )
22
 
 
23
  gr.Markdown("<div style='margin-top: 8px;'></div>")
24
 
25
  # 🟦 Button
26
  suggest_btn = gr.Button("πŸ” Get Suggestions")
27
 
 
28
  gr.Markdown("<div style='margin-top: 12px;'></div>")
29
 
30
  # 🟨 Output Section
 
38
 
39
  # 🧠 Connect logic to FLAN model
40
  suggest_btn.click(
41
+ fn=generate_product_description,
42
  inputs=suggestion_input,
43
  outputs=suggestions_output
44
  )
45
+
46
+ # πŸ’… CSS for centered text and consistent spacing
47
+ gr.Markdown(
48
+ """
49
+ <style>
50
+ .centered-text {
51
+ text-align: center;
52
+ font-size: 16px;
53
+ font-weight: 500;
54
+ }
55
+ #suggestion-box textarea {
56
+ font-family: 'Courier New', monospace;
57
+ font-size: 14px;
58
+ background-color: #111827;
59
+ color: #e5e7eb;
60
+ border-radius: 10px;
61
+ padding: 10px;
62
+ white-space: pre-line; /* important for preserving line breaks */
63
+ }
64
+ </style>
65
+ """
66
+ )