salomonsky commited on
Commit
46a71f7
1 Parent(s): ae62d87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -93,8 +93,8 @@ async def gen(prompt, basemodel, width, height, scales, steps, seed, upscale_fac
93
 
94
  async def improve_prompt(prompt, language):
95
  try:
96
- instruction_en = "With this idea, describe in English a detailed txt2img prompt in 500 characters at most, add illumination, atmosphere, cinematic elements, and characters..."
97
- instruction_es = "Con esta idea, describe en español un prompt detallado de txt2img en un máximo de 500 caracteres, añadiendo iluminación, atmósfera, elementos cinematográficos y personajes..."
98
  instruction = instruction_en if language == "en" else instruction_es
99
  formatted_prompt = f"{prompt}: {instruction}"
100
  response = llm_client.text_generation(formatted_prompt, max_new_tokens=500)
@@ -135,11 +135,11 @@ def delete_image(image_path):
135
  def main():
136
  st.set_page_config(layout="wide")
137
  prompt = st.sidebar.text_input("Descripción de la imagen", max_chars=200)
138
- process_enhancer = st.sidebar.checkbox("Mejorar Prompt", value=True)
139
  language = st.sidebar.selectbox("Idioma", ["en", "es"])
140
  basemodel = st.sidebar.selectbox("Modelo Base", ["black-forest-labs/FLUX.1-DEV", "black-forest-labs/FLUX.1-schnell"])
141
  format_option = st.sidebar.selectbox("Formato", ["9:16", "16:9"])
142
- process_upscale = st.sidebar.checkbox("Procesar Escalador", value=True)
143
  upscale_factor = st.sidebar.selectbox("Factor de Escala", [2, 4, 8], index=0)
144
  scales = st.sidebar.slider("Escalado", 1, 20, 10)
145
  steps = st.sidebar.slider("Pasos", 1, 100, 20)
 
93
 
94
  async def improve_prompt(prompt, language):
95
  try:
96
+ instruction_en = "With this idea, describe in English a detailed txt2img prompt in 500 characters at most, add illumination, atmosphere, cinematic elements, and characters if need it..."
97
+ instruction_es = "Con esta idea, describe en español un prompt detallado de txt2img en un máximo de 500 caracteres, con iluminación, atmósfera, elementos cinematográficos y en su caso personajes..."
98
  instruction = instruction_en if language == "en" else instruction_es
99
  formatted_prompt = f"{prompt}: {instruction}"
100
  response = llm_client.text_generation(formatted_prompt, max_new_tokens=500)
 
135
  def main():
136
  st.set_page_config(layout="wide")
137
  prompt = st.sidebar.text_input("Descripción de la imagen", max_chars=200)
138
+ process_enhancer = st.sidebar.checkbox("Mejorar Prompt", value=False)
139
  language = st.sidebar.selectbox("Idioma", ["en", "es"])
140
  basemodel = st.sidebar.selectbox("Modelo Base", ["black-forest-labs/FLUX.1-DEV", "black-forest-labs/FLUX.1-schnell"])
141
  format_option = st.sidebar.selectbox("Formato", ["9:16", "16:9"])
142
+ process_upscale = st.sidebar.checkbox("Procesar Escalador", value=False)
143
  upscale_factor = st.sidebar.selectbox("Factor de Escala", [2, 4, 8], index=0)
144
  scales = st.sidebar.slider("Escalado", 1, 20, 10)
145
  steps = st.sidebar.slider("Pasos", 1, 100, 20)