owaiskha9654 commited on
Commit
d2ef392
1 Parent(s): d83d73f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -13,8 +13,10 @@ try:
13
  model = torch.hub.load('jinfagang/yolov7', 'custom', path=yolov7_weights, force_reload=True) # local repo
14
  except:
15
  import zipfile
16
- with zipfile.ZipFile("../.cache/torch/hub/main.zip","r") as zip_ref:
17
- zip_ref.extractall("../.cache/torch/hub/jinfagang_yolov7_main/")
 
 
18
  def object_detection(im, size=416):
19
  results = model(im) # inference
20
  #results.print() # print results to screen
 
13
  model = torch.hub.load('jinfagang/yolov7', 'custom', path=yolov7_weights, force_reload=True) # local repo
14
  except:
15
  import zipfile
16
+ l_files = os.listdir("./.cache/torch/hub")
17
+ print(l_files)
18
+ with zipfile.ZipFile("./.cache/torch/hub/main.zip","r") as zip_ref:
19
+ zip_ref.extractall("./.cache/torch/hub/jinfagang_yolov7_main/")
20
  def object_detection(im, size=416):
21
  results = model(im) # inference
22
  #results.print() # print results to screen