michaelwja commited on
Commit
f7fc015
1 Parent(s): 4d98c09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,14 +10,14 @@ FILENAME = "skin_burn.pt"
10
  yolov7_custom_weights = hf_hub_download(repo_id=REPO_ID, filename=FILENAME,repo_type='space')
11
 
12
  model = torch.hub.load('WongKinYiu/yolov7:main',model='custom', path_or_model=yolov7_custom_weights, force_reload=True)
13
- def object_detection(im, size=416):
14
  results = model(im)
15
  results.render()
16
  return Image.fromarray(results.imgs[0])
17
 
18
  title = "Yolov7 Skin Burn Detection"
19
 
20
- image = gr.inputs.Image(shape=(416,416), image_mode="RGB", source="upload", label="Upload Image", optional=False)
21
  outputs = gr.outputs.Image(type="pil", label="Output Image")
22
 
23
 
 
10
  yolov7_custom_weights = hf_hub_download(repo_id=REPO_ID, filename=FILENAME,repo_type='space')
11
 
12
  model = torch.hub.load('WongKinYiu/yolov7:main',model='custom', path_or_model=yolov7_custom_weights, force_reload=True)
13
+ def object_detection(im, size=614):
14
  results = model(im)
15
  results.render()
16
  return Image.fromarray(results.imgs[0])
17
 
18
  title = "Yolov7 Skin Burn Detection"
19
 
20
+ image = gr.inputs.Image(shape=(614,614), image_mode="RGB", source="upload", label="Upload Image", optional=False)
21
  outputs = gr.outputs.Image(type="pil", label="Output Image")
22
 
23