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

Method browse_image

ML/tests/gui_test.py:327–336  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

325 self.model_path_input.setText(os.path.abspath(default_path))
326
327 def browse_image(self):
328 file_path, _ = QFileDialog.getOpenFileName(
329 self,
330 'Select Image File',
331 '',
332 'Image Files (*.png *.jpg *.jpeg *.bmp *.gif);;All Files (*.*)'
333 )
334 if file_path:
335 self.image_path_input.setText(file_path)
336 self.display_image(file_path)
337
338 def display_image(self, image_path):
339 try:

Callers

nothing calls this directly

Calls 1

display_imageMethod · 0.95

Tested by

no test coverage detected