Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed formatting #12

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions demo/src/gui.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os

import gradio as gr

from gradio_shinymodel3d import ShinyModel3D

from .convert import nifti_to_obj
Expand Down Expand Up @@ -52,7 +51,7 @@ def __init__(
step=1,
label="Which 2D slice to show",
)
#self.volume_renderer = gr.Model3D(
# self.volume_renderer = gr.Model3D(
self.volume_renderer = ShinyModel3D()

def set_class_name(self, value):
Expand Down Expand Up @@ -88,7 +87,11 @@ def process(self, mesh_file_name):

def get_img_pred_pair(self, k):
k = int(k)
out = gr.AnnotatedImage(self.combine_ct_and_seg(self.images[k], self.pred_images[k]), visible=True, elem_id="model-2d",)
out = gr.AnnotatedImage(
self.combine_ct_and_seg(self.images[k], self.pred_images[k]),
visible=True,
elem_id="model-2d",
)
return out

def toggle_sidebar(self, state):
Expand All @@ -108,9 +111,9 @@ def run(self):
autoscroll=True,
elem_id="logs",
show_copy_button=True,
#scroll_to_output=False,
# scroll_to_output=False,
container=True,
#line_breaks=True,
# line_breaks=True,
)
demo.load(read_logs, None, logs, every=1)

Expand Down
Loading