anh1811 commited on
Commit
2fa5504
·
1 Parent(s): 0803b95

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -361,7 +361,7 @@ if uploaded_file is not None:
361
  checkpoint = torch.load(file_path, map_location=device)
362
  model.load_state_dict(checkpoint["state_dict"])
363
  model.eval()
364
- image_1 = infer(model, image, 0.5, 0.5, scaled_anchors)
365
 
366
  #task 2
367
  image = Image.open(uploaded_file)
@@ -370,7 +370,7 @@ if uploaded_file is not None:
370
  checkpoint = torch.load(file_path, map_location=device)
371
  model.load_state_dict(checkpoint["state_dict"])
372
  model.eval()
373
- image_2 = infer(model, image, 0.5, 0.5, scaled_anchors)
374
 
375
  #ft
376
  image = Image.open(uploaded_file)
@@ -378,7 +378,7 @@ if uploaded_file is not None:
378
  checkpoint = torch.load(file_path, map_location=device)
379
  model.load_state_dict(checkpoint["state_dict"])
380
  model.eval()
381
- image_3 = infer(model, image, 0.5, 0.5, scaled_anchors)
382
  # Streamlit App
383
  # Widget tải lên file ảnh
384
 
 
361
  checkpoint = torch.load(file_path, map_location=device)
362
  model.load_state_dict(checkpoint["state_dict"])
363
  model.eval()
364
+ image_1 = infer(model, image, 0.7, 0.8, scaled_anchors)
365
 
366
  #task 2
367
  image = Image.open(uploaded_file)
 
370
  checkpoint = torch.load(file_path, map_location=device)
371
  model.load_state_dict(checkpoint["state_dict"])
372
  model.eval()
373
+ image_2 = infer(model, image, 0.7, 0.8, scaled_anchors)
374
 
375
  #ft
376
  image = Image.open(uploaded_file)
 
378
  checkpoint = torch.load(file_path, map_location=device)
379
  model.load_state_dict(checkpoint["state_dict"])
380
  model.eval()
381
+ image_3 = infer(model, image, 0.7, 0.8, scaled_anchors)
382
  # Streamlit App
383
  # Widget tải lên file ảnh
384