Spaces:
Paused
Paused
File size: 647 Bytes
82cdd19 21b7e19 82cdd19 21b7e19 4d7a1f2 feabab6 21b7e19 82cdd19 4115668 82cdd19 0068562 52f462c 21b7e19 82cdd19 4d5fcf9 21b7e19 feabab6 21b7e19 4d7a1f2 feabab6 |
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 |
import streamlit as st
import streamlit_authenticator as stauth
from utils import get_answer
authenticator = stauth.Authenticate(
eval(st.secrets["creds"]),
st.secrets["name"],
st.secrets["key"],
int(st.secrets["expiry_days"]),
)
st.title("Le risposte alle tue domande personali")
name, authentication_status, username = authenticator.login()
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)
elif authentication_status == False:
st.error("Username/password non sono corretti.")
|