salomonsky commited on
Commit
bc1f498
1 Parent(s): 716cb3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -8,6 +8,14 @@ from huggingface_hub import InferenceClient, AsyncInferenceClient
8
  from gradio_client import Client, handle_file
9
  import asyncio
10
  from concurrent.futures import ThreadPoolExecutor
 
 
 
 
 
 
 
 
11
 
12
  MAX_SEED = np.iinfo(np.int32).max
13
  HF_TOKEN_UPSCALER = os.environ.get("HF_TOKEN_UPSCALER")
 
8
  from gradio_client import Client, handle_file
9
  import asyncio
10
  from concurrent.futures import ThreadPoolExecutor
11
+ import yaml
12
+
13
+ try:
14
+ with open("config.yaml", "r") as file:
15
+ credentials = yaml.safe_load(file)
16
+ except Exception as e:
17
+ st.error(f"Error al cargar el archivo de configuración: {e}")
18
+ credentials = {"username": "", "password": ""}
19
 
20
  MAX_SEED = np.iinfo(np.int32).max
21
  HF_TOKEN_UPSCALER = os.environ.get("HF_TOKEN_UPSCALER")