Spaces:
Sleeping
Sleeping
Update ui/layout.py
Browse files- ui/layout.py +48 -11
ui/layout.py
CHANGED
@@ -1,11 +1,48 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
from ui.navigator_tab import create_navigator_tab
|
3 |
-
from ui.suggestions_tab import create_suggestions_tab
|
4 |
-
|
5 |
-
def build_ui():
|
6 |
-
with gr.Blocks(title="RetailGenie") as demo:
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from ui.navigator_tab import create_navigator_tab
|
3 |
+
from ui.suggestions_tab import create_suggestions_tab
|
4 |
+
|
5 |
+
def build_ui():
|
6 |
+
with gr.Blocks(title="RetailGenie") as demo:
|
7 |
+
# β
Global CSS
|
8 |
+
gr.HTML(
|
9 |
+
"""
|
10 |
+
<style>
|
11 |
+
.centered-text {
|
12 |
+
text-align: center;
|
13 |
+
font-size: 16px;
|
14 |
+
font-weight: 500;
|
15 |
+
margin-bottom: 12px;
|
16 |
+
}
|
17 |
+
#main-wrapper {
|
18 |
+
max-width: 1000px;
|
19 |
+
margin: 0 auto;
|
20 |
+
padding: 20px;
|
21 |
+
}
|
22 |
+
</style>
|
23 |
+
"""
|
24 |
+
)
|
25 |
+
|
26 |
+
# π§Ύ Disclaimer
|
27 |
+
gr.Markdown(
|
28 |
+
"""
|
29 |
+
<div style="background-color:#2a2a2a; padding: 15px; border-radius: 10px; border: 1px solid #444; text-align: center; font-size: 14px; color: #ddd;">
|
30 |
+
β <strong>Disclaimer:</strong> <strong>RetailGenie</strong> is a prototype developed for <strong>educational and demonstration purposes only</strong>. Product suggestions, availability, and store locations are based on <strong>sample data</strong> and may not reflect real-time inventory.<br><br>
|
31 |
+
π <strong>Note:</strong> Some responses may take a few seconds due to model inference and file processing within a constrained development environment.
|
32 |
+
</div>
|
33 |
+
""",
|
34 |
+
elem_classes="centered-text"
|
35 |
+
)
|
36 |
+
|
37 |
+
# π§ββ Title
|
38 |
+
gr.Markdown("# π§ββ RetailGenie β In-Store Smart Assistant", elem_classes="centered-text")
|
39 |
+
|
40 |
+
# π‘ Tabs
|
41 |
+
with gr.Tabs():
|
42 |
+
create_navigator_tab()
|
43 |
+
create_suggestions_tab()
|
44 |
+
|
45 |
+
# π Footer
|
46 |
+
gr.Markdown("Made by TEAM AtoMβ‘", elem_classes="centered-text")
|
47 |
+
|
48 |
+
return demo
|