Spaces:
Running
Running
Update ui/suggestions_tab.py
Browse files- ui/suggestions_tab.py +5 -4
ui/suggestions_tab.py
CHANGED
@@ -3,6 +3,7 @@ from smart_suggestion.flan_suggestor import generate_product_description
|
|
3 |
|
4 |
def create_suggestions_tab():
|
5 |
with gr.TabItem("π Smart Suggestions"):
|
|
|
6 |
gr.Markdown(
|
7 |
"""
|
8 |
## π€ Ask RetailGenie for Recommendations
|
@@ -21,13 +22,13 @@ def create_suggestions_tab():
|
|
21 |
)
|
22 |
|
23 |
# π Add vertical spacing
|
24 |
-
gr.Markdown("<
|
25 |
|
26 |
# π¦ Button
|
27 |
suggest_btn = gr.Button("π Get Suggestions")
|
28 |
|
29 |
# π Add vertical spacing
|
30 |
-
gr.Markdown("<
|
31 |
|
32 |
# π¨ Output Section
|
33 |
suggestions_output = gr.Textbox(
|
@@ -38,14 +39,14 @@ def create_suggestions_tab():
|
|
38 |
elem_id="suggestion-box"
|
39 |
)
|
40 |
|
41 |
-
#
|
42 |
suggest_btn.click(
|
43 |
generate_product_description,
|
44 |
inputs=suggestion_input,
|
45 |
outputs=suggestions_output
|
46 |
)
|
47 |
|
48 |
-
# Optional
|
49 |
gr.Markdown(
|
50 |
"""
|
51 |
<style>
|
|
|
3 |
|
4 |
def create_suggestions_tab():
|
5 |
with gr.TabItem("π Smart Suggestions"):
|
6 |
+
# π· Header
|
7 |
gr.Markdown(
|
8 |
"""
|
9 |
## π€ Ask RetailGenie for Recommendations
|
|
|
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
|
34 |
suggestions_output = gr.Textbox(
|
|
|
39 |
elem_id="suggestion-box"
|
40 |
)
|
41 |
|
42 |
+
# π§ Connect logic to FLAN model
|
43 |
suggest_btn.click(
|
44 |
generate_product_description,
|
45 |
inputs=suggestion_input,
|
46 |
outputs=suggestions_output
|
47 |
)
|
48 |
|
49 |
+
# π
Optional CSS Styling
|
50 |
gr.Markdown(
|
51 |
"""
|
52 |
<style>
|