Skip to content
Snippets Groups Projects
Commit 99ba3e55 authored by David Grundfest's avatar David Grundfest
Browse files

Small fix in GUI

parent c27454e7
No related branches found
No related tags found
1 merge request!111Small fix in GUI
from pathlib import Path from pathlib import Path
from abc import abstractmethod, ABC from abc import abstractmethod, ABC
from os import path from os import path, listdir
import gradio as gr import gradio as gr
...@@ -113,13 +113,7 @@ class InterfaceWithExamples(BaseInterface): ...@@ -113,13 +113,7 @@ class InterfaceWithExamples(BaseInterface):
self._set_examples_list() self._set_examples_list()
def _set_examples_list(self): def _set_examples_list(self):
examples = [ valid_sufixes = (".tif", ".tiff", ".h5", ".nii", ".gz", ".dcm", ".DCM", ".vol", ".vgi", ".txrm", ".txm", ".xrm")
"fly_150x256x256.tif", examples_folder = path.join(self.qim_dir, 'examples')
"cement_128x128x128.tif", self.img_examples = [path.join(examples_folder, example) for example in listdir(examples_folder) if example.endswith(valid_sufixes)]
"NT_128x128x128.tif",
"shell_225x128x128.tif",
"bone_128x128x128.tif",
]
self.img_examples = []
for example in examples:
self.img_examples.append([path.join(self.qim_dir, "examples", example)])
...@@ -85,7 +85,7 @@ class Interface(InterfaceWithExamples): ...@@ -85,7 +85,7 @@ class Interface(InterfaceWithExamples):
def define_interface(self): def define_interface(self):
gr.Markdown( gr.Markdown(
"Interface for _Fast local thickness in 3D and 2D_ (https://github.com/vedranaa/local-thickness)" "Interface for _Fast local thickness in 3D_ (https://github.com/vedranaa/local-thickness)"
) )
with gr.Row(): with gr.Row():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment