m7mdal7aj commited on
Commit
69ec8fe
1 Parent(s): 7e216b9

Update my_model/results/demo.py

Browse files
Files changed (1) hide show
  1. my_model/results/demo.py +3 -1
my_model/results/demo.py CHANGED
@@ -16,6 +16,7 @@ class ResultDemonstrator:
16
  sample_img_pool (list[str]): List of image file names available for demonstration.
17
  model_names (list[str]): List of model names as defined in the configuration.
18
  model_configs (list[str]): List of model configurations as defined in the configuration.
 
19
  """
20
 
21
  def __init__(self) -> None:
@@ -27,6 +28,7 @@ class ResultDemonstrator:
27
  self.sample_img_pool = list(os.listdir(config.DEMO_IMAGES_PATH))
28
  self.model_names = config.MODEL_NAMES
29
  self.model_configs = config.MODEL_CONFIGURATIONS
 
30
 
31
  @staticmethod
32
  def display_table(data: pd.DataFrame) -> None:
@@ -208,7 +210,7 @@ class ResultDemonstrator:
208
 
209
  for img_filename in target_imgs:
210
  image_data = self.main_data[self.main_data['image_filename'] == img_filename]
211
- im = Image.open(f"{config.DEMO_IMAGES_PATH}/{img_filename}")
212
  col1, col2 = st.columns([1, 2]) # to display images side by side with their data.
213
  # Create a container for each image
214
  with st.container():
 
16
  sample_img_pool (list[str]): List of image file names available for demonstration.
17
  model_names (list[str]): List of model names as defined in the configuration.
18
  model_configs (list[str]): List of model configurations as defined in the configuration.
19
+ demo_images_path(str): Path to the demo images directory.
20
  """
21
 
22
  def __init__(self) -> None:
 
28
  self.sample_img_pool = list(os.listdir(config.DEMO_IMAGES_PATH))
29
  self.model_names = config.MODEL_NAMES
30
  self.model_configs = config.MODEL_CONFIGURATIONS
31
+ self.demo_images_path = config.DEMO_IMAGES_PATH
32
 
33
  @staticmethod
34
  def display_table(data: pd.DataFrame) -> None:
 
210
 
211
  for img_filename in target_imgs:
212
  image_data = self.main_data[self.main_data['image_filename'] == img_filename]
213
+ im = Image.open(f"{self.demo_images_path}/{img_filename}")
214
  col1, col2 = st.columns([1, 2]) # to display images side by side with their data.
215
  # Create a container for each image
216
  with st.container():