qoobeeshy commited on
Commit
1ad6c41
1 Parent(s): cab47c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -176,14 +176,19 @@ def overlay(image, mask, color, alpha, resize=None):
176
 
177
 
178
 
 
 
 
179
 
180
- general_model_path = 'e50_aug.pt'
181
- image_model_path = 'e100_img.pt'
182
 
183
- general_model = YOLO(general_model_path)
184
- image_model = YOLO(image_model_path)
 
 
185
 
186
- sample_path = ['0040da34-25c8-4a5a-a6aa-36733ea3b8eb.png']
187
 
188
  flags = {
189
  'hist': False,
 
176
 
177
 
178
 
179
+ model_path = 'models'
180
+ general_model_name = 'e50_aug.pt'
181
+ image_model_name = 'e100_img.pt'
182
 
183
+ general_model = YOLO(os.path.join(model_path, general_model_name))
184
+ image_model = YOLO(os.path.join(model_path, image_model_name))
185
 
186
+ image_path = 'examples'
187
+ sample_name = ['0040da34-25c8-4a5a-a6aa-36733ea3b8eb.png', '00fb93d5-7c67-4851-ad08-f23ed2159467.png',
188
+ '0050a8ee-382b-447e-9c5b-8506d9507bef.png', '0064d3e2-3ba2-4332-a28f-3a165f2b84b1.png',
189
+ '019384d0-88c2-46ba-8f1b-bf7432f50ea3.png']
190
 
191
+ sample_path = [os.path.join(image_path, sample) for sample in sample_name]
192
 
193
  flags = {
194
  'hist': False,