m7mdal7aj commited on
Commit
5667733
1 Parent(s): 2cd3e03

Update my_model/tabs/run_inference.py

Browse files
Files changed (1) hide show
  1. my_model/tabs/run_inference.py +3 -3
my_model/tabs/run_inference.py CHANGED
@@ -34,8 +34,8 @@ class InferenceRunner(StateManager):
34
  cols = self.col1.columns(len(self.sample_images))
35
  for idx, sample_image_path in enumerate(self.sample_images):
36
  with cols[idx]:
37
- #image = Image.open(sample_image_path)
38
- image_for_display = self.resize_image(sample_image_path, 100, 100)
39
  st.image(image_for_display)
40
  if st.button(f'Select Sample Image {idx + 1}', key=f'sample_{idx}'):
41
  self.process_new_image(sample_image_path, image, kbvqa)
@@ -47,7 +47,7 @@ class InferenceRunner(StateManager):
47
 
48
  # Display and interact with each uploaded/selected image
49
  for image_key, image_data in self.get_images_data().items():
50
- image_for_display = self.resize_image(image_for_display, 500)
51
  self.col2.image(image_for_display, caption=f'Uploaded Image: {image_key[-11:]}')
52
  if not image_data['analysis_done']:
53
  self.col2.text("Please click 'Analyze Image'..")
 
34
  cols = self.col1.columns(len(self.sample_images))
35
  for idx, sample_image_path in enumerate(self.sample_images):
36
  with cols[idx]:
37
+ image = Image.open(sample_image_path)
38
+ image_for_display = self.resize_image(sample_image_path, 80, 80)
39
  st.image(image_for_display)
40
  if st.button(f'Select Sample Image {idx + 1}', key=f'sample_{idx}'):
41
  self.process_new_image(sample_image_path, image, kbvqa)
 
47
 
48
  # Display and interact with each uploaded/selected image
49
  for image_key, image_data in self.get_images_data().items():
50
+ image_for_display = self.resize_image(image_data['image'], 600)
51
  self.col2.image(image_for_display, caption=f'Uploaded Image: {image_key[-11:]}')
52
  if not image_data['analysis_done']:
53
  self.col2.text("Please click 'Analyze Image'..")