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

Method create_left_panel

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

Source from the content-addressed store, hash-verified

89 main_layout.addWidget(right_panel, 1)
90
91 def create_left_panel(self):
92 panel = QWidget()
93 layout = QVBoxLayout()
94 panel.setLayout(layout)
95
96 title = QLabel('🚀 NeuralForge Model Tester')
97 title.setFont(QFont('Arial', 20, QFont.Weight.Bold))
98 title.setAlignment(Qt.AlignmentFlag.AlignCenter)
99 layout.addWidget(title)
100
101 model_group = QGroupBox('Model Selection')
102 model_layout = QVBoxLayout()
103
104 model_path_layout = QHBoxLayout()
105 self.model_path_input = QLineEdit()
106 self.model_path_input.setPlaceholderText('Path to model file (.pt)')
107 model_path_layout.addWidget(self.model_path_input)
108
109 browse_btn = QPushButton('Browse')
110 browse_btn.clicked.connect(self.browse_model)
111 model_path_layout.addWidget(browse_btn)
112
113 default_btn = QPushButton('Use Default')
114 default_btn.clicked.connect(self.use_default_model)
115 model_path_layout.addWidget(default_btn)
116
117 model_layout.addLayout(model_path_layout)
118
119 dataset_layout = QHBoxLayout()
120 dataset_label = QLabel('Dataset:')
121 self.dataset_input = QLineEdit('cifar10')
122 self.dataset_input.setPlaceholderText('cifar10, mnist, stl10, tiny_imagenet, etc.')
123 self.dataset_input.setToolTip('Supported: cifar10, cifar100, mnist, fashion_mnist, stl10,\ntiny_imagenet, imagenet, food101, caltech256, oxford_pets')
124 dataset_layout.addWidget(dataset_label)
125 dataset_layout.addWidget(self.dataset_input)
126 model_layout.addLayout(dataset_layout)
127
128 self.load_model_btn = QPushButton('Load Model')
129 self.load_model_btn.clicked.connect(self.load_model)
130 model_layout.addWidget(self.load_model_btn)
131
132 self.model_status = QLabel('No model loaded')
133 self.model_status.setAlignment(Qt.AlignmentFlag.AlignCenter)
134 model_layout.addWidget(self.model_status)
135
136 model_group.setLayout(model_layout)
137 layout.addWidget(model_group)
138
139 image_group = QGroupBox('Image Selection')
140 image_layout = QVBoxLayout()
141
142 image_path_layout = QHBoxLayout()
143 self.image_path_input = QLineEdit()
144 self.image_path_input.setPlaceholderText('Path to image file')
145 image_path_layout.addWidget(self.image_path_input)
146
147 browse_image_btn = QPushButton('Browse')
148 browse_image_btn.clicked.connect(self.browse_image)

Callers 1

init_uiMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected