We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d623cff commit 454f04eCopy full SHA for 454f04e
1 file changed
stage3.0_first_views/traited_face_detect.py
@@ -27,6 +27,13 @@ class ImageFile(HasStrictTraits):
27
28
metadata = Dict
29
30
+ traits_view = View(
31
+ Item(name='filepath', show_label=False),
32
+ buttons=[OKButton],
33
+ resizable=True,
34
+ width=640
35
+ )
36
+
37
def to_array(self):
38
if not self.filepath:
39
return np.array([])
@@ -74,13 +81,7 @@ def _detect_faces(self):
74
81
75
82
if __name__ == '__main__':
76
83
img = ImageFile()
77
- view = View(
78
- Item(name='filepath', show_label=False),
79
- buttons=[OKButton],
80
- resizable=True,
- width=640
- )
- img.configure_traits(view=view)
84
+ img.configure_traits()
85
86
plt.imshow(img.to_array())
87
img_desc = plt.gca()
0 commit comments