Spaces:
Sleeping
Sleeping
Update app.py
Browse files7 unmodified lines891011121314151617181920212223242526272829303114323334266 unmodified lines3013023032873043053067 unmodified linesimport sysfrom dotenv import load_dotenvimport jsonload_dotenv()
st.set_page_config(layout="wide", page_title="Generatore Excel AI")st.title("📊 Generatore Excel AI")
if "logged" not in st.session_state: st.session_state.logged = Falseif st.session_state.logged == False: login_placeholder = st.empty() with login_placeholder.container(): container = st.container(border=True) username = container.text_input('Username') password = container.text_input('Passowrd', type='password') login = container.button(' Login ', type='primary') if not login or username != os.getenv("LOGIN_USER") or password != os.getenv("LOGIN_PASSWORD"): if login: st.error('Password Errata') st.stop() st.session_state.logged = True login_placeholder.empty()
load_dotenv()API_KEY = os.getenv("API_HUGGINGFACE")BASE_URL = "https://matteoscript-ai.hf.space/v1/"MODEL_NAME = "gemini-2.5-flash-preview-05-20" # Sostituisci con il tuo modello preferito266 unmodified lines )
def render_main_content(): st.title("📊 Generatore Excel AI") st.markdown("Definisci richiesta e numero Fogli, poi l'AI **pianificherà, genererà, collegherà** e tenterà di auto-correggere gli script dei fogli")
if st.sidebar.button("💡 Pianifica Fogli con AI", type="primary", use_container_width=True):app.py+18-2