Spaces:
Running
Running
salomonsky
commited on
Commit
•
e141429
1
Parent(s):
1d05019
Update app.py
Browse files
app.py
CHANGED
@@ -7,15 +7,14 @@ from insightface.app import FaceAnalysis
|
|
7 |
import streamlit as st
|
8 |
from huggingface_hub import InferenceClient, AsyncInferenceClient
|
9 |
import yaml
|
|
|
10 |
|
11 |
-
# Cargar credenciales
|
12 |
try:
|
13 |
with open("config.yaml", "r") as file:
|
14 |
credentials = yaml.safe_load(file)
|
15 |
except Exception:
|
16 |
credentials = {"username": "", "password": ""}
|
17 |
|
18 |
-
# Configuraciones iniciales
|
19 |
MAX_SEED = 2**31 - 1
|
20 |
HF_TOKEN_UPSCALER = os.environ.get("HF_TOKEN_UPSCALER")
|
21 |
client = AsyncInferenceClient()
|
@@ -105,7 +104,6 @@ def main():
|
|
105 |
login_form(credentials)
|
106 |
return
|
107 |
|
108 |
-
# Mantener la sesión activa
|
109 |
st.sidebar.text_input("Descripción de la imagen", max_chars=900, key='prompt')
|
110 |
process_enhancer = st.sidebar.checkbox("Mejorar Prompt", value=False)
|
111 |
language = st.sidebar.selectbox("Idioma", ["en", "es"])
|
|
|
7 |
import streamlit as st
|
8 |
from huggingface_hub import InferenceClient, AsyncInferenceClient
|
9 |
import yaml
|
10 |
+
import insightface
|
11 |
|
|
|
12 |
try:
|
13 |
with open("config.yaml", "r") as file:
|
14 |
credentials = yaml.safe_load(file)
|
15 |
except Exception:
|
16 |
credentials = {"username": "", "password": ""}
|
17 |
|
|
|
18 |
MAX_SEED = 2**31 - 1
|
19 |
HF_TOKEN_UPSCALER = os.environ.get("HF_TOKEN_UPSCALER")
|
20 |
client = AsyncInferenceClient()
|
|
|
104 |
login_form(credentials)
|
105 |
return
|
106 |
|
|
|
107 |
st.sidebar.text_input("Descripción de la imagen", max_chars=900, key='prompt')
|
108 |
process_enhancer = st.sidebar.checkbox("Mejorar Prompt", value=False)
|
109 |
language = st.sidebar.selectbox("Idioma", ["en", "es"])
|