Spaces:
Paused
Paused
import streamlit as st | |
import streamlit_authenticator as stauth | |
import yaml | |
from utils import get_answer | |
with open('./config.yaml') as file: | |
config = yaml.load(file, Loader=stauth.SafeLoader) | |
print(st.secrets) | |
authenticator = stauth.Authenticate( | |
config['credentials'], | |
config['cookie']['name'], | |
config['cookie']['key'], | |
config['cookie']['expiry_days'] | |
) | |
name, authentication_status, username = authenticator.login('Login', 'main') | |
st.title("Le risposte alle tue domande personali") | |
if authentication_status: | |
input = st.text_input("Scrivi una domanda in italiano e comparirà la risposta!") | |
if input: | |
response = get_answer(input) | |
st.write(response) |