updated header style
Browse files
app.py
CHANGED
@@ -2,7 +2,6 @@ import pandas as pd
|
|
2 |
import gradio as gr
|
3 |
from datetime import datetime
|
4 |
from inference import RecommendationEngine
|
5 |
-
import spaces
|
6 |
|
7 |
|
8 |
class QueryInputForm:
|
@@ -26,7 +25,6 @@ class QueryInputForm:
|
|
26 |
# Initialize the recommender engine
|
27 |
self.recommender_engine = RecommendationEngine()
|
28 |
|
29 |
-
@spaces.GPU
|
30 |
def get_recommendations(self, channel, device_type, query_text):
|
31 |
# Pass the query information to the recommender engine
|
32 |
raw_query = {
|
@@ -54,7 +52,9 @@ def recommendation_interface(channel, device_type, query_text):
|
|
54 |
|
55 |
|
56 |
with gr.Blocks() as interface:
|
57 |
-
gr.Markdown(
|
|
|
|
|
58 |
|
59 |
with gr.Row(): # Use Row to place components side by side
|
60 |
with gr.Column():
|
@@ -86,17 +86,9 @@ with gr.Blocks() as interface:
|
|
86 |
|
87 |
# Add custom CSS for styling
|
88 |
interface.css = """
|
89 |
-
.title {
|
90 |
-
color: #E76E00;
|
91 |
-
text-align: center;
|
92 |
-
margin: 40px;
|
93 |
-
margin-bottom: 30px !important;
|
94 |
-
font-size: 36px;
|
95 |
-
font-weight: bold;
|
96 |
-
}
|
97 |
#submit-button {
|
98 |
background-color: #E76E00;
|
99 |
-
color:
|
100 |
border: none;
|
101 |
padding: 10px 20px;
|
102 |
font-size: 16px;
|
@@ -106,11 +98,6 @@ interface.css = """
|
|
106 |
#submit-button:hover {
|
107 |
background-color: #FF8C00;
|
108 |
}
|
109 |
-
#recommendation-table .gradio-header {
|
110 |
-
background-color: #FF8C00; /* Orange header */
|
111 |
-
color: white; /* White text */
|
112 |
-
font-weight: bold; /* Optional: Bold text */
|
113 |
-
}
|
114 |
"""
|
115 |
|
116 |
if __name__ == "__main__":
|
|
|
2 |
import gradio as gr
|
3 |
from datetime import datetime
|
4 |
from inference import RecommendationEngine
|
|
|
5 |
|
6 |
|
7 |
class QueryInputForm:
|
|
|
25 |
# Initialize the recommender engine
|
26 |
self.recommender_engine = RecommendationEngine()
|
27 |
|
|
|
28 |
def get_recommendations(self, channel, device_type, query_text):
|
29 |
# Pass the query information to the recommender engine
|
30 |
raw_query = {
|
|
|
52 |
|
53 |
|
54 |
with gr.Blocks() as interface:
|
55 |
+
gr.Markdown(
|
56 |
+
"<h1 style='color:#E76E00; text-align: center; font-weight: bold; font-size: 40px; margin: 60px; margin-bottom: 30px !important;'>E-Commerce Recommendation Engine Demo</h1>"
|
57 |
+
)
|
58 |
|
59 |
with gr.Row(): # Use Row to place components side by side
|
60 |
with gr.Column():
|
|
|
86 |
|
87 |
# Add custom CSS for styling
|
88 |
interface.css = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
#submit-button {
|
90 |
background-color: #E76E00;
|
91 |
+
color: black;
|
92 |
border: none;
|
93 |
padding: 10px 20px;
|
94 |
font-size: 16px;
|
|
|
98 |
#submit-button:hover {
|
99 |
background-color: #FF8C00;
|
100 |
}
|
|
|
|
|
|
|
|
|
|
|
101 |
"""
|
102 |
|
103 |
if __name__ == "__main__":
|