Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import cv2
|
|
3 |
import numpy as np
|
4 |
from datetime import datetime
|
5 |
import random
|
|
|
6 |
|
7 |
#----------Start of theme----------
|
8 |
theme = gr.themes.Soft(
|
@@ -285,7 +286,17 @@ with gr.Blocks(theme=theme, css=css) as app:
|
|
285 |
gr.HTML("<center><h6>🎨 Image Studio</h6></center>")
|
286 |
with gr.Tab("Text to Image"):
|
287 |
#gr.load("models/digiplay/AnalogMadness-realistic-model-v7")
|
288 |
-
gr.load("models/XLabs-AI/flux-RealismLora")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
with gr.Tab("Flip Image"):
|
290 |
with gr.Row():
|
291 |
image_input = gr.Image(type="numpy", label="Upload Image")
|
@@ -338,5 +349,5 @@ with gr.Blocks(theme=theme, css=css) as app:
|
|
338 |
|
339 |
iface = gr.Interface(fn=upscale_image, inputs = [gr.Image(label="Input Image", interactive=True), radio_input], outputs = gr.Image(label="Upscaled Image", format="png"), title="Image Upscaler")
|
340 |
|
341 |
-
app.launch(share=
|
342 |
|
|
|
3 |
import numpy as np
|
4 |
from datetime import datetime
|
5 |
import random
|
6 |
+
from transformers import pipeline
|
7 |
|
8 |
#----------Start of theme----------
|
9 |
theme = gr.themes.Soft(
|
|
|
286 |
gr.HTML("<center><h6>🎨 Image Studio</h6></center>")
|
287 |
with gr.Tab("Text to Image"):
|
288 |
#gr.load("models/digiplay/AnalogMadness-realistic-model-v7")
|
289 |
+
#gr.load("models/XLabs-AI/flux-RealismLora")
|
290 |
+
model=“./models/XLabs-AI/flux-RealismLora"
|
291 |
+
def model(image):
|
292 |
+
return model(image)[0][“Image”]
|
293 |
+
text_prompt = gr.Textbox(label="Prompt", placeholder="Enter a prompt")
|
294 |
+
image_output = gr.Image(type="pil", label="Image Output", format="png"
|
295 |
+
text_btn = gr.Button(“Run”)
|
296 |
+
text_btn.click(model, text_prompt, image_output)
|
297 |
+
|
298 |
+
|
299 |
+
btn.click(summary, input_text, output_text)
|
300 |
with gr.Tab("Flip Image"):
|
301 |
with gr.Row():
|
302 |
image_input = gr.Image(type="numpy", label="Upload Image")
|
|
|
349 |
|
350 |
iface = gr.Interface(fn=upscale_image, inputs = [gr.Image(label="Input Image", interactive=True), radio_input], outputs = gr.Image(label="Upscaled Image", format="png"), title="Image Upscaler")
|
351 |
|
352 |
+
app.launch(share=False)
|
353 |
|