Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
app look
Browse files
app.py
CHANGED
|
@@ -11,8 +11,8 @@ from yaml.loader import SafeLoader
|
|
| 11 |
st.set_page_config(
|
| 12 |
layout="wide",
|
| 13 |
page_icon="/home/ubuntu/images/opensearch_mark_default.png"
|
|
|
|
| 14 |
)
|
| 15 |
-
|
| 16 |
st.markdown("""
|
| 17 |
<style>
|
| 18 |
/* Import Amazon Ember font */
|
|
@@ -20,13 +20,15 @@ st.markdown("""
|
|
| 20 |
|
| 21 |
/* Global layout tweaks */
|
| 22 |
html, body, .main {
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
|
|
|
| 27 |
font-family: 'Amazon Ember', sans-serif;
|
| 28 |
}
|
| 29 |
-
|
| 30 |
.block-container {
|
| 31 |
padding-top: 5rem;
|
| 32 |
}
|
|
@@ -45,93 +47,150 @@ st.markdown("""
|
|
| 45 |
margin-bottom: 10px;
|
| 46 |
}
|
| 47 |
|
| 48 |
-
|
| 49 |
-
.
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
-
.demo-card:hover {
|
| 64 |
-
background-color: #e46e08 !important;
|
| 65 |
-
color: #000 !important;
|
| 66 |
-
}
|
| 67 |
|
| 68 |
-
.demo-text {
|
| 69 |
-
font-size: 28px;
|
| 70 |
-
color: #c5c3c0;
|
| 71 |
-
font-family: 'Amazon Ember Cd RC 250', sans-serif;
|
| 72 |
-
display: flex;
|
| 73 |
-
align-items: center;
|
| 74 |
-
gap: 10px;
|
| 75 |
-
}
|
| 76 |
-
|
| 77 |
-
.demo-arrow {
|
| 78 |
-
font-size: 26px;
|
| 79 |
-
font-weight: bold;
|
| 80 |
-
color: #fff;
|
| 81 |
-
opacity: 0;
|
| 82 |
-
transform: scale(1);
|
| 83 |
-
transition: all 0.3s ease-in-out;
|
| 84 |
-
}
|
| 85 |
|
| 86 |
-
.demo-card:hover .demo-arrow {
|
| 87 |
-
opacity: 1;
|
| 88 |
-
color: #000;
|
| 89 |
-
}
|
| 90 |
-
|
| 91 |
-
.demo-card:active .demo-arrow {
|
| 92 |
-
transform: scale(1.3) rotate(45deg);
|
| 93 |
-
}
|
| 94 |
-
|
| 95 |
-
.demo-button {
|
| 96 |
-
background-color: #000000;
|
| 97 |
-
border: 1px solid #888;
|
| 98 |
-
color: white;
|
| 99 |
-
padding: 8px 18px;
|
| 100 |
-
border-radius: 6px;
|
| 101 |
-
font-size: 16px;
|
| 102 |
-
}
|
| 103 |
</style>
|
| 104 |
""", unsafe_allow_html=True)
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
|
|
|
| 109 |
# Header with logo and title
|
| 110 |
-
extra, col_logo, col_title = st.columns([3,
|
| 111 |
with col_logo:
|
| 112 |
st.image("/home/user/app/images/OS_AI_1_cropped.png", use_column_width=True)
|
|
|
|
|
|
|
| 113 |
st.write("")
|
| 114 |
st.write("")
|
|
|
|
| 115 |
#st.image("/home/ubuntu/images/OS_AI_1.png", use_column_width=True)
|
| 116 |
# with col_title:
|
| 117 |
# st.write("")
|
| 118 |
# st.markdown('<div class="title">OpenSearch AI demos</div>', unsafe_allow_html=True)
|
| 119 |
|
| 120 |
-
def demo_link_block(icon, title, target_page):
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
</div>
|
| 129 |
</a>
|
| 130 |
""", unsafe_allow_html=True)
|
| 131 |
|
| 132 |
-
st.write("")
|
| 133 |
-
demo_link_block("π", "AI Search", "Semantic_Search")
|
| 134 |
-
demo_link_block("π¬","Multimodal Conversational Search", "Multimodal_Conversational_Search")
|
| 135 |
-
demo_link_block("ποΈ","Agentic Shopping Assistant", "AI_Shopping_Assistant")
|
| 136 |
|
| 137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
st.set_page_config(
|
| 12 |
layout="wide",
|
| 13 |
page_icon="/home/ubuntu/images/opensearch_mark_default.png"
|
| 14 |
+
|
| 15 |
)
|
|
|
|
| 16 |
st.markdown("""
|
| 17 |
<style>
|
| 18 |
/* Import Amazon Ember font */
|
|
|
|
| 20 |
|
| 21 |
/* Global layout tweaks */
|
| 22 |
html, body, .main {
|
| 23 |
+
html, body, .main {
|
| 24 |
+
background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 30%, #102132 100%);
|
| 25 |
+
height: 100vh;
|
| 26 |
+
overflow: hidden;
|
| 27 |
+
color: white;
|
| 28 |
+
}
|
| 29 |
font-family: 'Amazon Ember', sans-serif;
|
| 30 |
}
|
| 31 |
+
|
| 32 |
.block-container {
|
| 33 |
padding-top: 5rem;
|
| 34 |
}
|
|
|
|
| 47 |
margin-bottom: 10px;
|
| 48 |
}
|
| 49 |
|
| 50 |
+
|
| 51 |
+
.card {
|
| 52 |
+
background: rgba(255, 255, 255, 0.05); /* subtle white tint */
|
| 53 |
+
backdrop-filter: blur(8px); /* frosted glass effect */
|
| 54 |
+
border-radius: 12px;
|
| 55 |
+
padding: 24px 16px;
|
| 56 |
+
height: 220px;
|
| 57 |
+
color: white;
|
| 58 |
+
box-shadow: 0 0 10px rgba(0,0,0,0.3);
|
| 59 |
+
transition: transform 0.2s ease, background 0.2s ease;
|
| 60 |
+
display: flex;
|
| 61 |
+
flex-direction: column;
|
| 62 |
+
justify-content: space-between;
|
| 63 |
+
position: relative;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
.card:hover {
|
| 67 |
+
transform: scale(1.02);
|
| 68 |
+
color: #e46e08;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
/* Header strip with icon */
|
| 72 |
+
.card-header {
|
| 73 |
+
font-size: 25px;
|
| 74 |
+
color: #AAA;
|
| 75 |
+
text-transform: uppercase;
|
| 76 |
+
border-bottom: 1px solid #444;
|
| 77 |
+
padding-bottom: 8px;
|
| 78 |
+
margin-bottom: 12px;
|
| 79 |
+
display: flex;
|
| 80 |
+
justify-content: center;
|
| 81 |
+
align-items: center;
|
| 82 |
+
height: 24px;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
.card-text {
|
| 86 |
+
font-size: 25px;
|
| 87 |
+
font-weight: 500;
|
| 88 |
+
flex-grow: 1;
|
| 89 |
+
display: flex;
|
| 90 |
+
align-items: center;
|
| 91 |
+
justify-content: center;
|
| 92 |
+
text-align: center;
|
| 93 |
+
padding: 0 8px;
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
/* Bottom arrow */
|
| 97 |
+
.card-arrow {
|
| 98 |
+
position: absolute;
|
| 99 |
+
bottom: 12px;
|
| 100 |
+
left: 50%;
|
| 101 |
+
transform: translateX(-50%) scale(1);
|
| 102 |
+
font-size: 22px;
|
| 103 |
+
font-weight: bold;
|
| 104 |
+
opacity: 0;
|
| 105 |
+
transition: all 0.3s ease-in-out;
|
| 106 |
+
color: #ffffff;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
.card:hover .card-arrow {
|
| 110 |
+
opacity: 1;
|
| 111 |
+
color: #e46e08;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
.card:active .card-arrow {
|
| 115 |
+
transform: translateX(-50%) scale(1.3);
|
| 116 |
+
}
|
| 117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
</style>
|
| 121 |
""", unsafe_allow_html=True)
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
+
|
| 127 |
# Header with logo and title
|
| 128 |
+
extra, col_logo, col_title = st.columns([3,40, 58])
|
| 129 |
with col_logo:
|
| 130 |
st.image("/home/user/app/images/OS_AI_1_cropped.png", use_column_width=True)
|
| 131 |
+
|
| 132 |
+
st.write("")
|
| 133 |
st.write("")
|
| 134 |
st.write("")
|
| 135 |
+
|
| 136 |
#st.image("/home/ubuntu/images/OS_AI_1.png", use_column_width=True)
|
| 137 |
# with col_title:
|
| 138 |
# st.write("")
|
| 139 |
# st.markdown('<div class="title">OpenSearch AI demos</div>', unsafe_allow_html=True)
|
| 140 |
|
| 141 |
+
# def demo_link_block(icon, title, target_page):
|
| 142 |
+
# st.markdown(f"""
|
| 143 |
+
# <a href="/{target_page}" target="_self" style="text-decoration: none;">
|
| 144 |
+
# <div class="demo-card">
|
| 145 |
+
# <div class="demo-text">
|
| 146 |
+
# <span>{icon} {title}</span>
|
| 147 |
+
# <span class="demo-arrow">β</span>
|
| 148 |
+
# </div>
|
| 149 |
+
# </div>
|
| 150 |
+
# </a>
|
| 151 |
+
# """, unsafe_allow_html=True)
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
# st.write("")
|
| 155 |
+
# demo_link_block("π", "AI Search", "Semantic_Search")
|
| 156 |
+
# demo_link_block("π¬","Multimodal Conversational Search", "Multimodal_Conversational_Search")
|
| 157 |
+
# demo_link_block("ποΈ","Agentic Shopping Assistant", "AI_Shopping_Assistant")
|
| 158 |
+
|
| 159 |
+
|
| 160 |
+
col1, col2, col3 = st.columns(3)
|
| 161 |
+
|
| 162 |
+
with col1:
|
| 163 |
+
st.markdown("""
|
| 164 |
+
<a href="/Semantic_Search" target="_self" style="text-decoration: none;">
|
| 165 |
+
<div class="card">
|
| 166 |
+
<div class="card-header">π</div>
|
| 167 |
+
<div class="card-text">AI Search</div>
|
| 168 |
+
<div class="card-arrow">β</div>
|
| 169 |
</div>
|
| 170 |
</a>
|
| 171 |
""", unsafe_allow_html=True)
|
| 172 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
|
| 174 |
|
| 175 |
+
|
| 176 |
+
with col2:
|
| 177 |
+
st.markdown("""
|
| 178 |
+
<a href="/Multimodal_Conversational_Search" target="_self" style="text-decoration: none;">
|
| 179 |
+
<div class="card">
|
| 180 |
+
<div class="card-header">π¬</div>
|
| 181 |
+
<div class="card-text">Multimodal RAG</div>
|
| 182 |
+
<div class="card-arrow">β</div>
|
| 183 |
+
</div>
|
| 184 |
+
</a>
|
| 185 |
+
""", unsafe_allow_html=True)
|
| 186 |
+
|
| 187 |
+
with col3:
|
| 188 |
+
st.markdown("""
|
| 189 |
+
<a href="/AI_Shopping_Assistant" target="_self" style="text-decoration: none;">
|
| 190 |
+
<div class="card">
|
| 191 |
+
<div class="card-header">ποΈ</div>
|
| 192 |
+
<div class="card-text">Agentic Shopping Assistant</div>
|
| 193 |
+
<div class="card-arrow">β</div>
|
| 194 |
+
</div>
|
| 195 |
+
</a>
|
| 196 |
+
""", unsafe_allow_html=True)
|