MCPcopy Create free account
hub / github.com/geekcomputers/Python / display_image

Method display_image

ML/tests/gui_test.py:338–345  ·  view source on GitHub ↗
(self, image_path)

Source from the content-addressed store, hash-verified

336 self.display_image(file_path)
337
338 def display_image(self, image_path):
339 try:
340 pixmap = QPixmap(image_path)
341 scaled_pixmap = pixmap.scaled(400, 300, Qt.AspectRatioMode.KeepAspectRatio,
342 Qt.TransformationMode.SmoothTransformation)
343 self.image_preview.setPixmap(scaled_pixmap)
344 except Exception as e:
345 self.image_preview.setText(f'Error loading image: {e}')
346
347 def load_model(self):
348 model_path = self.model_path_input.text()

Callers 1

browse_imageMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected