Spaces:
Sleeping
Sleeping
Commit ·
cf48067
1
Parent(s): 765f053
Im strugglign
Browse files12 unmodified lines13141516171819202122232425262728293031323334353637383940414243444512 unmodified linesinitial_sidebar_state="expanded",)import streamlit as stfrom transformers import pipelinefrom PIL import Imagefrom huggingface_hub import InferenceClientimport osfrom gradio_client import Client# Set page configurationst.set_page_config(page_title="DelishAI - Your Culinary Assistant",page_icon="🍽️",layout="centered",initial_sidebar_state="expanded",)# Updated CSS functiondef local_css():st.markdown("""<!-- [Insert the updated CSS code here] -->""", unsafe_allow_html=True)local_css()# Rest of your code remains the same...# Hugging Face API keyAPI_KEY = st.secrets["HF_API_KEY"]12 unmodified lines13141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812 unmodified linesinitial_sidebar_state="expanded",)def local_css():st.markdown("""<style>/* Main layout */.main { background-color: #f5f7fa; }/* Title styling */.title h1 {font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;text-align: center;color: #007ACC; /* Changed to blue */font-size: 3rem;margin-bottom: 20px;}/* Image styling */.st-image img {border-radius: 15px;margin-bottom: 20px;max-width: 100%;}/* Sidebar styling */[data-testid="stSidebar"] {background-color: #ffffff; /* Changed to white */border-right: 1px solid #e6e6e6;}[data-testid="stSidebar"] .css-ng1t4o { color: #333333; }[data-testid="stSidebar"] .css-1d391kg { color: #333333; }/* File uploader styling */.stFileUploader {border: 2px dashed #007ACC; /* Changed to blue */border-radius: 10px;padding: 20px;text-align: center;color: #007ACC; /* Changed to blue */background-color: #ffffff;font-weight: bold;}/* File uploader hover effect */.stFileUploader:hover {background-color: #e6f2ff; /* Light blue hover effect */}/* Button styling */.stButton>button {background-color: #007ACC; /* Changed to blue */color: white;border: none;padding: 0.7rem 1.5rem;border-radius: 5px;font-size: 1.1rem;font-weight: bold;margin-top: 10px;cursor: pointer;}.stButton>button:hover {background-color: #005a99; /* Darker blue on hover */color: white;}/* Headers styling */h2 {color: #007ACC; /* Changed to blue */margin-top: 30px;font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;}h3 {color: #007ACC; /* Changed to blue */font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;}/* Text styling */.stMarkdown p { font-size: 1.1rem; color: #333333; }/* Footer styling */footer { visibility: hidden; }/* Hide sidebar on small screens */@media only screen and (max-width: 600px) {[data-testid="stSidebar"] { display: none; }.main .block-container { padding-left: 1rem; padding-right: 1rem; }.title h1 { font-size: 2rem; }.stButton>button { width: 100%; }}/* Sample images grid */.sample-images {display: flex;justify-content: center;flex-wrap: wrap;gap: 10px;}.sample-images img {width: 150px;height: 150px;object-fit: cover;border-radius: 10px;cursor: pointer;border: 2px solid transparent;}.sample-images img:hover {border: 2px solid #007ACC; /* Changed to blue */}</style>""", unsafe_allow_html=True)# Hugging Face API keyAPI_KEY = st.secrets["HF_API_KEY"]
app.py+104-21