Spaces:
Runtime error
Runtime error
File size: 2,429 Bytes
6a47c59 ad91ef3 ea62a8d ad91ef3 ea62a8d ad91ef3 ea62a8d 6a47c59 ad91ef3 c4ad622 ea62a8d c4ad622 a87363f c4ad622 ea62a8d a87363f ea62a8d c4ad622 6a47c59 ad91ef3 c4ad622 6a47c59 ea62a8d c4ad622 ad91ef3 c4ad622 ea62a8d c4ad622 ad91ef3 c4ad622 ea62a8d a87363f ea62a8d a87363f ea62a8d ad91ef3 6a47c59 c4ad622 6a47c59 ad91ef3 6a47c59 ea62a8d 6a47c59 ad91ef3 c4ad622 ea62a8d ad91ef3 c4ad622 ea62a8d ad91ef3 ea62a8d 6a47c59 ad91ef3 |
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 |
import streamlit as st
from streamlit_option_menu import option_menu
from modules import chatbot, text_to_speech, image_classification, image_to_text
from utils import styles, helpers
# Configuration initiale de la page Streamlit avec un titre et un layout spécifié.
st.set_page_config(page_title="Application IA", layout="wide")
# Application des styles CSS personnalisés pour l'application.
styles.apply_styles()
# Création du Menu de Navigation
with st.sidebar:
menu = option_menu(
"Onyx AI",
["Acceuil", "Documentation"],
icons=["play-btn", "info-circle"],
menu_icon="rocket",
default_index=0,
styles={
"container": {"background-color": "transparent"},
"icon": {"color": "#374151", "font-size": "17px"},
"nav-link": {
"font-size": "17px",
"text-align": "left",
"margin": "0px",
"--hover-color": "#eee",
},
"nav-link-selected": {"background-color": "#519ba7"},
},
)
# Gestion des Sections de l'Application
if menu == "Acceuil":
# # Contenu de la navbar avec des icônes appropriées
selected = option_menu(
menu_title=None,
options=[
"Chatbot",
"TextToSpeech",
"Classification",
"Image to text",
],
icons=[
"robot",
"volume-up",
"camera",
"file-text",
],
menu_icon="cast",
default_index=0,
orientation="horizontal",
styles={
"container": {
"background-color": "#fafafa",
"border-radius": "8px",
"background": "#fbfafa",
},
"icon": {"color": "#374151", "font-size": "17px"},
"nav-link": {
"font-size": "17px",
"text-align": "left",
"--hover-color": "#eee",
},
"nav-link-selected": {
"background-color": "#519ba7",
},
},
)
if selected == "Chatbot":
chatbot.show()
elif selected == "TextToSpeech":
text_to_speech.show()
elif selected == "Classification":
image_classification.show()
elif selected == "Image to text":
image_to_text.show()
elif menu == "Documentation":
helpers.show()
|