Skip to content

Commit

Permalink
remove broken image slider from ddcolor (#2643)
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova authored Jan 10, 2025
1 parent d14145b commit b4e50c7
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 225 deletions.
350 changes: 128 additions & 222 deletions notebooks/ddcolor-image-colorization/ddcolor-image-colorization.ipynb

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions notebooks/ddcolor-image-colorization/gradio_helper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import Callable
import gradio as gr
from gradio_imageslider import ImageSlider
from functools import partial


Expand All @@ -9,10 +8,10 @@ def make_demo(fn: Callable, quantized: bool):
with gr.Row(equal_height=False):
image = gr.Image(type="filepath")
with gr.Column():
output_image = ImageSlider(show_label=True, type="filepath", interactive=False, label="FP16 model output")
output_image = gr.Image(show_label=True, type="filepath", interactive=False, label="FP16 model output")
button = gr.Button(value="Run FP16 model")
with gr.Column(visible=quantized):
output_image_int8 = ImageSlider(show_label=True, type="filepath", interactive=False, label="INT8 model output")
output_image_int8 = gr.Image(show_label=True, type="filepath", interactive=False, label="INT8 model output")
button_i8 = gr.Button(value="Run INT8 model")
button.click(fn=partial(fn, use_int8=False), inputs=[image], outputs=[output_image])
button_i8.click(fn=partial(fn, use_int8=True), inputs=[image], outputs=[output_image_int8])
Expand Down

0 comments on commit b4e50c7

Please sign in to comment.