Spaces:
				
			
			
	
			
			
					
		Running
		
			on 
			
			CPU Upgrade
	
	
	
			
			
	
	
	
	
		
		
					
		Running
		
			on 
			
			CPU Upgrade
	| 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(""" | |
| <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; | |
| } | |
| .logo-container { | |
| margin-bottom: 3rem; /* Increase spacing between logo and cards */ | |
| position: relative; | |
| z-index: 1; | |
| } | |
| .block-container { | |
| padding-top: 5rem; | |
| } | |
| /* 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; | |
| height: 240px; | |
| 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.02); | |
| color: #e46e08; | |
| } | |
| /* Header strip with icon */ | |
| .card-header { | |
| font-size: 25px; | |
| color: #AAA; | |
| text-transform: uppercase; | |
| border-bottom: 1px solid #444; | |
| padding-bottom: 8px; | |
| margin-bottom: 12px; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| height: 24px; | |
| } | |
| .card-text { | |
| font-size: 28px; | |
| font-weight: 500; | |
| flex-grow: 1; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| text-align: center; | |
| padding: 0 8px; | |
| } | |
| /* 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:hover .card-arrow { | |
| opacity: 1; | |
| color: #e46e08; | |
| } | |
| .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([31, 66]) | |
| with col_logo: | |
| st.markdown(""" | |
| <div class="logo-container" style="position: absolute; top: 2rem; left: 2rem;"> | |
| <img src="/home/user/app/images/OS_AI_1_cropped.png" style="width: 180px;"> | |
| </div> | |
| """, unsafe_allow_html=True) | |
| # Optional: Add a margin-top to the demo section to avoid overlap | |
| st.markdown("<div style='margin-top: 160px;'></div>", unsafe_allow_html=True) | |
| # st.write("") | |
| # st.write("") | |
| # st.write("") | |
| # st.write("") | |
| col1, col2, col3 = st.columns(3) | |
| 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">AI Search</div> | |
| <div class="card-arrow">β</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">Multimodal RAG</div> | |
| <div class="card-arrow">β</div> | |
| </div> | |
| </a> | |
| """, 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">Agentic Shopping Assistant</div> | |
| <div class="card-arrow">β</div> | |
| </div> | |
| </a> | |
| """, unsafe_allow_html=True) | |
