Spaces:
Running
Running
salomonsky
commited on
Commit
•
28b7879
1
Parent(s):
a679a82
Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,6 @@ def list_saved_images():
|
|
42 |
return sorted(DATA_PATH.glob("*.jpg"), key=os.path.getmtime, reverse=True)
|
43 |
|
44 |
def display_gallery():
|
45 |
-
st.header("Galería de Imágenes Guardadas")
|
46 |
images = list_saved_images()
|
47 |
if images:
|
48 |
cols = st.columns(8)
|
@@ -69,14 +68,14 @@ def run_async(func, *args):
|
|
69 |
async def improve_prompt(prompt):
|
70 |
try:
|
71 |
instructions = [
|
72 |
-
"With my idea create a vibrant description for a detailed txt2img prompt, 300 characters max.",
|
73 |
-
"With my idea write a creative and detailed text-to-image prompt in English, 300 characters max.",
|
74 |
-
"With my idea generate a descriptive and
|
75 |
-
"With my idea describe a photorealistic with illumination txt2img prompt in English, 300 characters max.",
|
76 |
-
"With my idea give a realistic
|
77 |
-
"With my idea conform a visually dynamic and
|
78 |
-
"With my idea realize an
|
79 |
-
"With my idea make a
|
80 |
]
|
81 |
instruction = random.choice(instructions)
|
82 |
formatted_prompt = f"{prompt}: {instruction}"
|
@@ -141,12 +140,11 @@ async def main():
|
|
141 |
login_form()
|
142 |
return
|
143 |
|
144 |
-
st.title("Flux + Multiple Images")
|
145 |
prompt = st.sidebar.text_area("Descripción de la imagen", height=150, max_chars=500)
|
146 |
format_option = st.sidebar.selectbox("Formato", ["9:16", "16:9", "1:1"])
|
147 |
prompt_checkbox = st.sidebar.checkbox("Mejorar Prompt")
|
148 |
model_option = st.sidebar.selectbox("Modelo", ["black-forest-labs/FLUX.1-schnell", "black-forest-labs/FLUX.1-dev"])
|
149 |
-
style_option = st.sidebar.selectbox("
|
150 |
|
151 |
width, height = (360, 640) if format_option == "9:16" else (640, 360) if format_option == "16:9" else (640, 640)
|
152 |
|
|
|
42 |
return sorted(DATA_PATH.glob("*.jpg"), key=os.path.getmtime, reverse=True)
|
43 |
|
44 |
def display_gallery():
|
|
|
45 |
images = list_saved_images()
|
46 |
if images:
|
47 |
cols = st.columns(8)
|
|
|
68 |
async def improve_prompt(prompt):
|
69 |
try:
|
70 |
instructions = [
|
71 |
+
"With my idea, create a vibrant and photorealistic description for a detailed txt2img prompt in English, 300 characters max.",
|
72 |
+
"With my idea, write a creative, realistic, and detailed text-to-image prompt in English, 300 characters max.",
|
73 |
+
"With my idea, generate a descriptive and True to life txt2img prompt in English, 300 characters max.",
|
74 |
+
"With my idea, describe a photorealistic scene with detailed illumination for a txt2img prompt in English, 300 characters max.",
|
75 |
+
"With my idea, give a realistic, elegant txt2img prompt in English, emphasizing photorealism, 300 characters max.",
|
76 |
+
"With my idea, conform a visually dynamic and hyperrealistic txt2img prompt in English, 300 characters max.",
|
77 |
+
"With my idea, realize an Down-to-earth and cinematic txt2img prompt in English with hyperrealistic elements, 300 characters max.",
|
78 |
+
"With my idea, make a lifelike and txt2img prompt in English, focusing on photorealistic depth, 300 characters max."
|
79 |
]
|
80 |
instruction = random.choice(instructions)
|
81 |
formatted_prompt = f"{prompt}: {instruction}"
|
|
|
140 |
login_form()
|
141 |
return
|
142 |
|
|
|
143 |
prompt = st.sidebar.text_area("Descripción de la imagen", height=150, max_chars=500)
|
144 |
format_option = st.sidebar.selectbox("Formato", ["9:16", "16:9", "1:1"])
|
145 |
prompt_checkbox = st.sidebar.checkbox("Mejorar Prompt")
|
146 |
model_option = st.sidebar.selectbox("Modelo", ["black-forest-labs/FLUX.1-schnell", "black-forest-labs/FLUX.1-dev"])
|
147 |
+
style_option = st.sidebar.selectbox("Camara", ["Over Showder", "Medium Shot", "Long Shot", "Close-UP", "Dutch Angle", "High Angle", "Low Angle", "Oblique Angle"])
|
148 |
|
149 |
width, height = (360, 640) if format_option == "9:16" else (640, 360) if format_option == "16:9" else (640, 640)
|
150 |
|