Spaces:
Running
on
Zero
Running
on
Zero
bump gradio native image slider
Browse files- README.md +1 -1
- app.py +3 -6
- requirements.txt +1 -2
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.27.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
suggested_hardware: t4-medium
|
app.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
import spaces
|
2 |
import gradio as gr
|
3 |
-
from gradio_imageslider import ImageSlider
|
4 |
import torch
|
5 |
|
6 |
torch.jit.script = lambda f: f
|
@@ -140,10 +139,9 @@ def predict(
|
|
140 |
)
|
141 |
print(f"Time taken: {time.time() - last_time}")
|
142 |
return (
|
143 |
-
# (padded_image, images.images[0]),
|
144 |
padded_image,
|
145 |
anyline_image,
|
146 |
-
images.images[0],
|
147 |
)
|
148 |
|
149 |
|
@@ -254,8 +252,7 @@ SDXL Controlnet [TheMistoAI/MistoLine](https://huggingface.co/TheMistoAI/MistoLi
|
|
254 |
btn = gr.Button()
|
255 |
with gr.Column(scale=2):
|
256 |
with gr.Group():
|
257 |
-
|
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,7 +270,7 @@ SDXL Controlnet [TheMistoAI/MistoLine](https://huggingface.co/TheMistoAI/MistoLi
|
|
273 |
guassian_sigma,
|
274 |
intensity_threshold,
|
275 |
]
|
276 |
-
outputs = [padded_image, anyline_image,
|
277 |
btn.click(lambda x: None, inputs=None, outputs=outputs).then(
|
278 |
fn=predict, inputs=inputs, outputs=outputs
|
279 |
)
|
|
|
1 |
import spaces
|
2 |
import gradio as gr
|
|
|
3 |
import torch
|
4 |
|
5 |
torch.jit.script = lambda f: f
|
|
|
139 |
)
|
140 |
print(f"Time taken: {time.time() - last_time}")
|
141 |
return (
|
|
|
142 |
padded_image,
|
143 |
anyline_image,
|
144 |
+
(padded_image, images.images[0]),
|
145 |
)
|
146 |
|
147 |
|
|
|
252 |
btn = gr.Button()
|
253 |
with gr.Column(scale=2):
|
254 |
with gr.Group():
|
255 |
+
image_slider = gr.ImageSlider()
|
|
|
256 |
with gr.Row():
|
257 |
padded_image = gr.Image(type="pil", label="Padded Image")
|
258 |
anyline_image = gr.Image(type="pil", label="Anyline Image")
|
|
|
270 |
guassian_sigma,
|
271 |
intensity_threshold,
|
272 |
]
|
273 |
+
outputs = [padded_image, anyline_image, image_slider]
|
274 |
btn.click(lambda x: None, inputs=None, outputs=outputs).then(
|
275 |
fn=predict, inputs=inputs, outputs=outputs
|
276 |
)
|
requirements.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
diffusers>=0.25.0
|
2 |
setuptools
|
3 |
hidiffusion==0.1.10
|
4 |
-
gradio==5.
|
5 |
accelerate
|
6 |
transformers
|
7 |
torchvision
|
@@ -9,7 +9,6 @@ xformers
|
|
9 |
accelerate
|
10 |
invisible-watermark
|
11 |
hf-transfer
|
12 |
-
gradio_imageslider
|
13 |
compel
|
14 |
opencv-python
|
15 |
numpy
|
|
|
1 |
diffusers>=0.25.0
|
2 |
setuptools
|
3 |
hidiffusion==0.1.10
|
4 |
+
gradio==5.27.0
|
5 |
accelerate
|
6 |
transformers
|
7 |
torchvision
|
|
|
9 |
accelerate
|
10 |
invisible-watermark
|
11 |
hf-transfer
|
|
|
12 |
compel
|
13 |
opencv-python
|
14 |
numpy
|