Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -26,6 +26,8 @@ class AppConfig:
|
|
26 |
CLEANUP_DAYS: int = 7
|
27 |
MAX_GALLERY_SIZE: int = 1000
|
28 |
|
|
|
|
|
29 |
try:
|
30 |
with open("credentials.yaml", "r") as file:
|
31 |
file_credentials = yaml.safe_load(file)
|
@@ -33,7 +35,7 @@ try:
|
|
33 |
credentials["password"] = file_credentials.get("password", credentials["password"])
|
34 |
except Exception as e:
|
35 |
logger.warning(f"No se pudo cargar el archivo de credenciales: {e}")
|
36 |
-
|
37 |
config = {
|
38 |
"development": {
|
39 |
"max_image_size": 1280,
|
@@ -202,7 +204,7 @@ def get_prompt_for_image(image_name):
|
|
202 |
def login_form():
|
203 |
st.title("Iniciar Sesi贸n")
|
204 |
username = st.text_input("Usuario", value="admin")
|
205 |
-
password = st.text_input("Contrase帽a", value="
|
206 |
if st.button("Iniciar Sesi贸n"):
|
207 |
if authenticate_user(username, password):
|
208 |
st.session_state['authenticated'] = True
|
|
|
26 |
CLEANUP_DAYS: int = 7
|
27 |
MAX_GALLERY_SIZE: int = 1000
|
28 |
|
29 |
+
credentials = {"username": "", "password": ""}
|
30 |
+
|
31 |
try:
|
32 |
with open("credentials.yaml", "r") as file:
|
33 |
file_credentials = yaml.safe_load(file)
|
|
|
35 |
credentials["password"] = file_credentials.get("password", credentials["password"])
|
36 |
except Exception as e:
|
37 |
logger.warning(f"No se pudo cargar el archivo de credenciales: {e}")
|
38 |
+
|
39 |
config = {
|
40 |
"development": {
|
41 |
"max_image_size": 1280,
|
|
|
204 |
def login_form():
|
205 |
st.title("Iniciar Sesi贸n")
|
206 |
username = st.text_input("Usuario", value="admin")
|
207 |
+
password = st.text_input("Contrase帽a", value="", type="password")
|
208 |
if st.button("Iniciar Sesi贸n"):
|
209 |
if authenticate_user(username, password):
|
210 |
st.session_state['authenticated'] = True
|