Update my_model/tabs/run_inference.py
Browse files
my_model/tabs/run_inference.py
CHANGED
@@ -36,7 +36,7 @@ class InferenceRunner(StateManager):
|
|
36 |
with cols[idx]:
|
37 |
image = Image.open(sample_image_path)
|
38 |
image_for_display = copy.deepcopy(image) # resize just for the display control without changing original image
|
39 |
-
image_for_display = self.resize_image(image_for_display,
|
40 |
st.image(image_for_display)
|
41 |
if st.button(f'Select Sample Image {idx + 1}', key=f'sample_{idx}'):
|
42 |
self.process_new_image(sample_image_path, image, kbvqa)
|
@@ -49,7 +49,7 @@ class InferenceRunner(StateManager):
|
|
49 |
# Display and interact with each uploaded/selected image
|
50 |
for image_key, image_data in self.get_images_data().items():
|
51 |
image_for_display = copy.deepcopy(image_data['image']) # resize just for the display control without changing original image
|
52 |
-
image_for_display = self.resize_image(image_for_display,
|
53 |
self.col2.image(image_for_display, caption=f'Uploaded Image: {image_key[-11:]}')
|
54 |
if not image_data['analysis_done']:
|
55 |
self.col2.text("Cool image, please click 'Analyze Image'..")
|
|
|
36 |
with cols[idx]:
|
37 |
image = Image.open(sample_image_path)
|
38 |
image_for_display = copy.deepcopy(image) # resize just for the display control without changing original image
|
39 |
+
image_for_display = self.resize_image(image_for_display, 300, 300)
|
40 |
st.image(image_for_display)
|
41 |
if st.button(f'Select Sample Image {idx + 1}', key=f'sample_{idx}'):
|
42 |
self.process_new_image(sample_image_path, image, kbvqa)
|
|
|
49 |
# Display and interact with each uploaded/selected image
|
50 |
for image_key, image_data in self.get_images_data().items():
|
51 |
image_for_display = copy.deepcopy(image_data['image']) # resize just for the display control without changing original image
|
52 |
+
image_for_display = self.resize_image(image_for_display, 500, 500)
|
53 |
self.col2.image(image_for_display, caption=f'Uploaded Image: {image_key[-11:]}')
|
54 |
if not image_data['analysis_done']:
|
55 |
self.col2.text("Cool image, please click 'Analyze Image'..")
|