Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -292,30 +292,7 @@ with gr.Blocks(theme=theme, css=css) as app:
|
|
292 |
gr.HTML("<center><h6>🎨 Image Studio</h6></center>")
|
293 |
with gr.Tab("Text to Image"):
|
294 |
#gr.load("models/digiplay/AnalogMadness-realistic-model-v7")
|
295 |
-
|
296 |
-
endpoint = HfInferenceEndpoint(
|
297 |
-
repo_id="XLabs-AI/flux-RealismLora",
|
298 |
-
task="text-to-image",
|
299 |
-
#token=API_KEY
|
300 |
-
)
|
301 |
-
|
302 |
-
def generate_image(text):
|
303 |
-
response = endpoint.text_to_image(
|
304 |
-
text,
|
305 |
-
guidance_scale=5, # Adjust as needed
|
306 |
-
steps=50, # Adjust as needed
|
307 |
-
height=1152, # Adjust as needed
|
308 |
-
width=896 # Adjust as needed
|
309 |
-
)
|
310 |
-
return response
|
311 |
-
|
312 |
-
iface = gr.Interface(
|
313 |
-
fn=generate_image,
|
314 |
-
inputs=gr.Textbox(lines=2, placeholder="Enter your prompt here..."),
|
315 |
-
outputs=gr.Image(),
|
316 |
-
title="Flux Text-to-Image",
|
317 |
-
description="Generate images using the XLabs-AI/flux-RealismLora model.",
|
318 |
-
)
|
319 |
|
320 |
with gr.Tab("Flip Image"):
|
321 |
with gr.Row():
|
|
|
292 |
gr.HTML("<center><h6>🎨 Image Studio</h6></center>")
|
293 |
with gr.Tab("Text to Image"):
|
294 |
#gr.load("models/digiplay/AnalogMadness-realistic-model-v7")
|
295 |
+
gr.load("models/XLabs-AI/flux-RealismLora")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
|
297 |
with gr.Tab("Flip Image"):
|
298 |
with gr.Row():
|