fahmiaziz98 commited on
Commit
ab29a0d
·
1 Parent(s): 665e8bb

frist commit

Browse files
Files changed (1) hide show
  1. router/image_clf.py +3 -2
router/image_clf.py CHANGED
@@ -32,10 +32,11 @@ def download_image(url):
32
  def image_classification(input: ImageInput)-> ImageOutput:
33
  try:
34
  pipe = load_model(MODEL_PATH, is_image_model=True)
35
- image = download_image(input.url)
 
36
 
37
  start = time.time()
38
- output = pipe(image)
39
  end = time.time()
40
 
41
  prediction_time = int((end-start)*1000)
 
32
  def image_classification(input: ImageInput)-> ImageOutput:
33
  try:
34
  pipe = load_model(MODEL_PATH, is_image_model=True)
35
+ # image = download_image(input.url)
36
+ urls = [str(x) for x in input.url]
37
 
38
  start = time.time()
39
+ output = pipe(urls)
40
  end = time.time()
41
 
42
  prediction_time = int((end-start)*1000)