temporary fix
Browse files- README.md +1 -1
- app.py +10 -4
- requirements.txt +1 -1
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 🔍🕵️
|
|
| 4 |
colorFrom: pink
|
| 5 |
colorTo: pink
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version: 5.
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
suggested_hardware: t4-medium
|
|
|
|
| 4 |
colorFrom: pink
|
| 5 |
colorTo: pink
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 5.26.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
suggested_hardware: t4-medium
|
app.py
CHANGED
|
@@ -139,7 +139,12 @@ def predict(
|
|
| 139 |
eta=1.0,
|
| 140 |
)
|
| 141 |
print(f"Time taken: {time.time() - last_time}")
|
| 142 |
-
return (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
|
| 144 |
|
| 145 |
css = """
|
|
@@ -249,7 +254,8 @@ SDXL Controlnet [TheMistoAI/MistoLine](https://huggingface.co/TheMistoAI/MistoLi
|
|
| 249 |
btn = gr.Button()
|
| 250 |
with gr.Column(scale=2):
|
| 251 |
with gr.Group():
|
| 252 |
-
|
|
|
|
| 253 |
with gr.Row():
|
| 254 |
padded_image = gr.Image(type="pil", label="Padded Image")
|
| 255 |
anyline_image = gr.Image(type="pil", label="Anyline Image")
|
|
@@ -267,8 +273,8 @@ SDXL Controlnet [TheMistoAI/MistoLine](https://huggingface.co/TheMistoAI/MistoLi
|
|
| 267 |
guassian_sigma,
|
| 268 |
intensity_threshold,
|
| 269 |
]
|
| 270 |
-
outputs = [
|
| 271 |
-
btn.click(lambda x: None, inputs=None, outputs=
|
| 272 |
fn=predict, inputs=inputs, outputs=outputs
|
| 273 |
)
|
| 274 |
gr.Examples(
|
|
|
|
| 139 |
eta=1.0,
|
| 140 |
)
|
| 141 |
print(f"Time taken: {time.time() - last_time}")
|
| 142 |
+
return (
|
| 143 |
+
images.images[0],
|
| 144 |
+
# (padded_image, images.images[0]),
|
| 145 |
+
padded_image,
|
| 146 |
+
anyline_image,
|
| 147 |
+
)
|
| 148 |
|
| 149 |
|
| 150 |
css = """
|
|
|
|
| 254 |
btn = gr.Button()
|
| 255 |
with gr.Column(scale=2):
|
| 256 |
with gr.Group():
|
| 257 |
+
output_image = gr.Image(type="pil", label="Output Image")
|
| 258 |
+
# image_slider = ImageSlider(position=0.5)
|
| 259 |
with gr.Row():
|
| 260 |
padded_image = gr.Image(type="pil", label="Padded Image")
|
| 261 |
anyline_image = gr.Image(type="pil", label="Anyline Image")
|
|
|
|
| 273 |
guassian_sigma,
|
| 274 |
intensity_threshold,
|
| 275 |
]
|
| 276 |
+
outputs = [padded_image, anyline_image, output_image]
|
| 277 |
+
btn.click(lambda x: None, inputs=None, outputs=output_image).then(
|
| 278 |
fn=predict, inputs=inputs, outputs=outputs
|
| 279 |
)
|
| 280 |
gr.Examples(
|
requirements.txt
CHANGED
|
@@ -9,7 +9,7 @@ xformers
|
|
| 9 |
accelerate
|
| 10 |
invisible-watermark
|
| 11 |
hf-transfer
|
| 12 |
-
gradio_imageslider
|
| 13 |
compel
|
| 14 |
opencv-python
|
| 15 |
numpy
|
|
|
|
| 9 |
accelerate
|
| 10 |
invisible-watermark
|
| 11 |
hf-transfer
|
| 12 |
+
gradio_imageslider
|
| 13 |
compel
|
| 14 |
opencv-python
|
| 15 |
numpy
|