Spaces:
Running
on
T4
Running
on
T4
File size: 6,225 Bytes
2e2dda5 9270b74 2e2dda5 dcdb5e8 2e2dda5 dea898e 9270b74 1bfd8c6 9270b74 dcdb5e8 58498bf 1bfd8c6 9270b74 58498bf 1bfd8c6 0f259d4 9270b74 2e2dda5 1bfd8c6 9270b74 e280474 1bfd8c6 9270b74 acaff0c dcdb5e8 f40d7dd e77968d dcdb5e8 acaff0c 55c758e acaff0c dcdb5e8 e77968d af1007a b3dfcea 4e5f163 9bb77d8 dcdb5e8 1163c0e 4e5f163 3d0c3c7 9bb77d8 dcdb5e8 7f8e07a 3d0c3c7 dcdb5e8 acaff0c 7f8e07a e58792f acaff0c dcdb5e8 e65a4d0 dcdb5e8 acaff0c dcdb5e8 acaff0c c55d364 9270b74 acaff0c 9270b74 67aeb50 9270b74 9535325 acaff0c 1a881dc fb69d13 dcdb5e8 acaff0c dcdb5e8 f40d7dd dcdb5e8 209fdbd a561fab 78b54d7 046dba2 95725c6 9270b74 acaff0c dcdb5e8 cb09d0b b3dfcea 78b54d7 046dba2 d4e338f dcdb5e8 e58792f dcdb5e8 cb09d0b b3dfcea 78b54d7 046dba2 e58792f dcdb5e8 dea898e acaff0c e58792f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
import streamlit as st
from PIL import Image
import base64
import yaml
import os
import urllib.request
import tarfile
from yaml.loader import SafeLoader
# Page setup
st.set_page_config(
layout="wide",
page_icon="/home/ubuntu/images/opensearch_mark_default.png"
)
st.markdown("""
<div id="home-page">
""", unsafe_allow_html=True)
st.markdown("""
<style>
/* Import Amazon Ember font */
@import url('https://fonts.cdnfonts.com/css/amazon-ember');
/* Global layout tweaks */
html, body, .main {
html, body, .main {
background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 30%, #102132 100%);
height: 100vh;
overflow: hidden;
color: white;
}
font-family: 'Amazon Ember', sans-serif;
}
.block-container {
padding-top: 2rem;
}
/* Hide Streamlit UI elements */
#MainMenu, header, footer,
button[title="View fullscreen"] {
visibility: hidden;
}
/* Title styling */
.title {
font-size: 40px;
color: #FF9900;
font-family: 'Amazon Ember Display 500', sans-serif;
margin-bottom: 10px;
}
.card {
background: rgba(255, 255, 255, 0.05); /* subtle white tint */
backdrop-filter: blur(8px); /* frosted glass effect */
border-radius: 12px;
padding: 24px 16px;
width: 100%;
margin: 0 auto;
height: 350px;
color: white;
box-shadow: 0 0 10px rgba(0,0,0,0.3);
transition: transform 0.2s ease, background 0.2s ease;
display: flex;
flex-direction: column;
justify-content: space-between;
position: relative;
}
.card:hover {
transform: scale(1.06); /* Optional: adds smooth grow effect */
transition: all 0.3s ease-in-out;
border: 2px solid rgba(255, 255, 255, 255); /* white border on hover */
}
.card-header {
font-size: 100px;
margin: 20px auto 12px auto;
display: flex;
justify-content: center;
align-items: center;
height: 60px;
width: 60px; /* make it a square box */
transition: all 0.3s ease-in-out;
}
# /* Hover glow only – no background, no border, just glow */
# .card:hover .card-header {
# box-shadow: 0 0 20px 8px rgba(228, 110, 8, 0.4); /* soft orange glow */
# border-radius: 50%;
# }
.card-text {
font-size: 45px;
font-weight: bold;
flex-grow: 1;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding: 0 8px;
}
.card:hover .card-text{
opacity: 1;
color: #e46e08;
font-size: 48px;
font-weight: bold;
transform: scale(1.2); /* Optional: adds smooth grow effect */
transition: all 0.3s ease-in-out;
}
/* Bottom arrow */
.card-arrow {
position: absolute;
bottom: 12px;
left: 50%;
transform: translateX(-50%) scale(1);
font-size: 22px;
font-weight: bold;
opacity: 0;
transition: all 0.3s ease-in-out;
color: #ffffff;
}
.card-description {
font-size: 16px;
color: #ccc;
text-align: center;
white-space: normal;
line-height: 1.4;
margin-top: auto;
padding: 0 12px 8px;
}
# .card:hover .card-arrow {
# opacity: 1;
# color: #e46e08;
# font-size: 30px;
# }
# .card:active .card-arrow {
# transform: translateX(-50%) scale(1.3);
# }
</style>
""", unsafe_allow_html=True)
# Header with logo and title
col_logo, col_title = st.columns([32, 68])
with col_logo:
st.image("/home/user/app/images/OS_AI_1_cropped.png", use_column_width=True)
spacer_col = st.columns(1)[0]
with spacer_col:
st.markdown("<div style='height: 50px;'></div>", unsafe_allow_html=True)
col1, col2, col3 = st.columns([1, 1, 1])
with col1:
st.markdown("""
<a href="/Semantic_Search" target="_self" style="text-decoration: none;">
<div class="card">
<div class="card-header">🔍</div>
<div class="card-text" style="font-size: 31px; color: #e46e08; ">AI Search</div>
<div class="card-description" style="font-size: 16px; color: #ccc; margin-top: 6px;text-align: center;white-space: normal;">
Explore ML search types, Re-ranking and Query rewriting on retail data </div>
</div>
</a>
""", unsafe_allow_html=True)
with col2:
st.markdown("""
<a href="/Multimodal_Conversational_Search" target="_self" style="text-decoration: none;">
<div class="card">
<div class="card-header">💬</div>
<div class="card-text" style="font-size: 31px; color: #e46e08; ">Multimodal RAG</div>
<div class="card-description" style="font-size: 16px; color: #ccc; margin-top: 6px;text-align: center;white-space: normal;">
Explore Multimodal RAG over complex PDFs (with tables, graphs etc) </div>
</div>
</a>
""", unsafe_allow_html=True)
st.markdown("""
</div>
""", unsafe_allow_html=True)
with col3:
st.markdown("""
<a href="/AI_Shopping_Assistant" target="_self" style="text-decoration: none;">
<div class="card">
<div class="card-header">🤖</div>
<div class="card-text" style="font-size: 31px; color: #e46e08;">Agentic RAG</div>
<div class="card-description" style="font-size: 16px; color: #ccc; margin-top: 6px;text-align: center;white-space: normal;">
Explore how an AI agent in front of RAG enhances product search experience </div>
</div>
</a>
""", unsafe_allow_html=True)
st.markdown("""
</div>
""", unsafe_allow_html=True)
st.markdown("""
<style>
#home-page html, #home-page body, #home-page .main {
background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 30%, #102132 100%);
height: 100vh;
overflow: hidden;
color: white;
}
</style>
""", unsafe_allow_html=True)
st.markdown("""
<style>
#home-page html, #home-page body, #home-page .main {
background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 30%, #102132 100%);
height: 100vh;
overflow: hidden;
color: white;
}
</style>
""", unsafe_allow_html=True)
|