Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,7 @@ import numpy as np
|
|
| 4 |
import os
|
| 5 |
from datetime import datetime
|
| 6 |
import random
|
|
|
|
| 7 |
|
| 8 |
#----------Start of theme----------
|
| 9 |
theme = gr.themes.Soft(
|
|
@@ -278,7 +279,11 @@ def image_processing(image, filter_type):
|
|
| 278 |
|
| 279 |
return cv2.cvtColor(output, cv2.COLOR_BGR2RGB) if len(output.shape) == 3 else output
|
| 280 |
|
| 281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 282 |
|
| 283 |
css = """
|
| 284 |
#app-container {
|
|
@@ -293,8 +298,13 @@ with gr.Blocks(theme=theme, css=css) as app:
|
|
| 293 |
gr.HTML("<center><h6>🎨 Image Studio</h6></center>")
|
| 294 |
with gr.Tab("Text to Image"):
|
| 295 |
#gr.load("models/digiplay/AnalogMadness-realistic-model-v7")
|
| 296 |
-
gr.HTML("<center><b>Flux</b></center>")
|
| 297 |
#gr.load("models/XLabs-AI/flux-RealismLora")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 298 |
gr.load("models/dvyio/flux-lora-film-noir")
|
| 299 |
|
| 300 |
with gr.Tab("Flip Image"):
|
|
|
|
| 4 |
import os
|
| 5 |
from datetime import datetime
|
| 6 |
import random
|
| 7 |
+
from transformers import pipeline
|
| 8 |
|
| 9 |
#----------Start of theme----------
|
| 10 |
theme = gr.themes.Soft(
|
|
|
|
| 279 |
|
| 280 |
return cv2.cvtColor(output, cv2.COLOR_BGR2RGB) if len(output.shape) == 3 else output
|
| 281 |
|
| 282 |
+
model=“./models/dvyio/flux-lora-film-noir”
|
| 283 |
+
imagegen = pipeline(“Imagegen”, model)
|
| 284 |
+
|
| 285 |
+
def image_gen(image):
|
| 286 |
+
return )(image)[0][“Image”]
|
| 287 |
|
| 288 |
css = """
|
| 289 |
#app-container {
|
|
|
|
| 298 |
gr.HTML("<center><h6>🎨 Image Studio</h6></center>")
|
| 299 |
with gr.Tab("Text to Image"):
|
| 300 |
#gr.load("models/digiplay/AnalogMadness-realistic-model-v7")
|
| 301 |
+
#gr.HTML("<center><b>Flux</b></center>")
|
| 302 |
#gr.load("models/XLabs-AI/flux-RealismLora")
|
| 303 |
+
text_button = gr.Button("Run", variant='primary', elem_id="gen-button")
|
| 304 |
+
input_prompt = gr.Textbox(placeholder=“Image Prompt”, lines=4)
|
| 305 |
+
image_output = gr.Image(type="pil", label="Image Output", format="png")
|
| 306 |
+
|
| 307 |
+
text_button.click(query, inputs=[input_prompt], outputs=[image_output])
|
| 308 |
gr.load("models/dvyio/flux-lora-film-noir")
|
| 309 |
|
| 310 |
with gr.Tab("Flip Image"):
|