Spaces:
Paused
Paused
File size: 710 Bytes
82cdd19 21b7e19 82cdd19 21b7e19 e5ef708 21b7e19 0fdee06 21b7e19 82cdd19 21b7e19 dcf6f0c 4115668 82cdd19 21b7e19 82cdd19 4d5fcf9 21b7e19 |
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 |
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) |