nickmuchi commited on
Commit
2c83425
1 Parent(s): 5f842d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -64,10 +64,8 @@ def detect_objects_from_url(model_name,url,threshold):
64
 
65
  model = YolosForObjectDetection.from_pretrained(model_name)
66
 
67
- if url:
68
-
69
- if validators.url(url):
70
- image = Image.open(requests.get(url, stream=True).raw)
71
 
72
  #Make prediction
73
  processed_outputs = make_prediction(image, feature_extractor, model)
 
64
 
65
  model = YolosForObjectDetection.from_pretrained(model_name)
66
 
67
+ if url and validators.url(url):
68
+ image = Image.open(requests.get(url, stream=True).raw)
 
 
69
 
70
  #Make prediction
71
  processed_outputs = make_prediction(image, feature_extractor, model)