nickmuchi commited on
Commit
ec26874
1 Parent(s): 02dcfc2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -65,8 +65,8 @@ def detect_objects(model_name,url_input,image_input,threshold):
65
 
66
  model = YolosForObjectDetection.from_pretrained(model_name)
67
 
68
- if url and validators.url(url):
69
- image = Image.open(requests.get(url, stream=True).raw)
70
 
71
  elif image_upload:
72
  image = image_upload
 
65
 
66
  model = YolosForObjectDetection.from_pretrained(model_name)
67
 
68
+ if url_input and validators.url(url_input):
69
+ image = Image.open(requests.get(url_input, stream=True).raw)
70
 
71
  elif image_upload:
72
  image = image_upload