(self, image_path)
| 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() |