aje6 commited on
Commit
e12043f
·
verified ·
1 Parent(s): bc0ea23

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -24
app.py CHANGED
@@ -210,33 +210,10 @@ from ultralytics import YOLO
210
  model = YOLO("Model_IV.pt")
211
  # model = torch.load("Model_IV.pt")
212
  # model.eval()
213
- checkpoint = torch.load("Model_IV.pt")
214
  # model.load_state_dict(checkpoint) # Load the saved weights
215
  # model.eval() # Set the model to evaluation mode
216
 
217
- # from ultralytics import settings
218
- # # Update multiple settings
219
- # settings.update({
220
- # "names": {0: 'A', 1: 'B',
221
- # 2: 'C', 3: 'D',
222
- # 4: 'E', 5: 'F',
223
- # 6: 'G', 7: 'H',
224
- # 8: 'I', 9: 'J',
225
- # 10: 'K', 11: 'L',
226
- # 12: 'M', 13: 'N',
227
- # 14: 'O', 15: 'P',
228
- # 16: 'Q', 17: 'R',
229
- # 18: 'S', 19: 'T',
230
- # 20: 'U', 21: 'V',
231
- # 22: 'W', 23: 'X',
232
- # 24: 'Y', 25: 'Z'},
233
- # save_dir: ''
234
- # })
235
-
236
- # print(type(checkpoint))
237
- # if isinstance(checkpoint, dict):
238
- # print(checkpoint.keys())
239
-
240
  # Define preprocessing
241
  transform = T.Compose([
242
  T.Resize((224, 224)), # Adjust to your model's input size
 
210
  model = YOLO("Model_IV.pt")
211
  # model = torch.load("Model_IV.pt")
212
  # model.eval()
213
+ # checkpoint = torch.load("Model_IV.pt")
214
  # model.load_state_dict(checkpoint) # Load the saved weights
215
  # model.eval() # Set the model to evaluation mode
216
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  # Define preprocessing
218
  transform = T.Compose([
219
  T.Resize((224, 224)), # Adjust to your model's input size