Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,15 +45,14 @@ def generate_image(prompt: str, seed: int = 42, aspect_ratio: str = "16:9", rand
|
|
| 45 |
|
| 46 |
width, height = ASPECT_RATIOS.get(aspect_ratio, (DEFAULT_WIDTH, DEFAULT_HEIGHT))
|
| 47 |
|
| 48 |
-
|
| 49 |
-
enhanced_prompt = prompt.strip() + ", ultra realistic, sharp, 8k resolution, cinematic lighting"
|
| 50 |
|
| 51 |
try:
|
| 52 |
generator = torch.Generator(device=device).manual_seed(int(float(seed)))
|
| 53 |
start_time = time.time()
|
| 54 |
with torch.inference_mode():
|
| 55 |
image = pipe(
|
| 56 |
-
prompt=
|
| 57 |
width=width,
|
| 58 |
height=height,
|
| 59 |
num_inference_steps=INFERENCE_STEPS,
|
|
@@ -75,23 +74,22 @@ examples = [
|
|
| 75 |
"Pamje nga një shtëpi moderne në stilin Minecraft"
|
| 76 |
]
|
| 77 |
|
| 78 |
-
# --- App Layout ---
|
| 79 |
with gr.Blocks(css="""
|
| 80 |
body::before {
|
| 81 |
content: "";
|
| 82 |
display: block;
|
| 83 |
height: 640px;
|
| 84 |
-
background-color:
|
| 85 |
}
|
| 86 |
button[aria-label="Download"] {
|
| 87 |
-
transform: scale(
|
| 88 |
transform-origin: top right;
|
| 89 |
margin: 0 !important;
|
| 90 |
padding: 6px !important;
|
| 91 |
}
|
| 92 |
""") as app:
|
| 93 |
gr.Markdown("# 🖼️ Gjenerues Imazhesh FLUX")
|
| 94 |
-
gr.Markdown("Përdor modelin FLUX për të krijuar imazhe fantastike
|
| 95 |
|
| 96 |
with gr.Row():
|
| 97 |
with gr.Column(scale=2):
|
|
|
|
| 45 |
|
| 46 |
width, height = ASPECT_RATIOS.get(aspect_ratio, (DEFAULT_WIDTH, DEFAULT_HEIGHT))
|
| 47 |
|
| 48 |
+
prompt += ", ultra realistic, sharp, 8k resolution, cinematic lighting"
|
|
|
|
| 49 |
|
| 50 |
try:
|
| 51 |
generator = torch.Generator(device=device).manual_seed(int(float(seed)))
|
| 52 |
start_time = time.time()
|
| 53 |
with torch.inference_mode():
|
| 54 |
image = pipe(
|
| 55 |
+
prompt=prompt,
|
| 56 |
width=width,
|
| 57 |
height=height,
|
| 58 |
num_inference_steps=INFERENCE_STEPS,
|
|
|
|
| 74 |
"Pamje nga një shtëpi moderne në stilin Minecraft"
|
| 75 |
]
|
| 76 |
|
|
|
|
| 77 |
with gr.Blocks(css="""
|
| 78 |
body::before {
|
| 79 |
content: "";
|
| 80 |
display: block;
|
| 81 |
height: 640px;
|
| 82 |
+
background-color: inherit;
|
| 83 |
}
|
| 84 |
button[aria-label="Download"] {
|
| 85 |
+
transform: scale(3);
|
| 86 |
transform-origin: top right;
|
| 87 |
margin: 0 !important;
|
| 88 |
padding: 6px !important;
|
| 89 |
}
|
| 90 |
""") as app:
|
| 91 |
gr.Markdown("# 🖼️ Gjenerues Imazhesh FLUX")
|
| 92 |
+
gr.Markdown("Përdor modelin FLUX për të krijuar imazhe fantastike.")
|
| 93 |
|
| 94 |
with gr.Row():
|
| 95 |
with gr.Column(scale=2):
|