Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,29 @@ load_dotenv()
|
|
11 |
|
12 |
st.set_page_config(page_title="AIdeaText", layout="wide", page_icon="random")
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
15 |
|
16 |
# Importaciones locales
|
|
|
11 |
|
12 |
st.set_page_config(page_title="AIdeaText", layout="wide", page_icon="random")
|
13 |
|
14 |
+
# Definir rutas de los archivos
|
15 |
+
ASSETS_DIR = os.path.join(os.path.dirname(__file__), 'assets', 'images')
|
16 |
+
LOGO_PATH = os.path.join(ASSETS_DIR, 'aideaText_logo.png')
|
17 |
+
|
18 |
+
# Funci贸n para verificar y cargar el logo
|
19 |
+
def setup_logo():
|
20 |
+
try:
|
21 |
+
if os.path.exists(LOGO_PATH):
|
22 |
+
# Para un logo cuadrado, usamos la misma imagen para ambos par谩metros
|
23 |
+
st.logo(
|
24 |
+
image=LOGO_PATH,
|
25 |
+
icon_image=LOGO_PATH, # Mismo archivo para ambos usos
|
26 |
+
size="medium", # "small", "medium", o "large"
|
27 |
+
link="https://tu-sitio-web.com" # Opcional: URL al hacer clic
|
28 |
+
)
|
29 |
+
return True
|
30 |
+
else:
|
31 |
+
logger.warning("Logo file not found")
|
32 |
+
return False
|
33 |
+
except Exception as e:
|
34 |
+
logger.error(f"Error setting up logo: {str(e)}")
|
35 |
+
return False
|
36 |
+
|
37 |
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
38 |
|
39 |
# Importaciones locales
|