Spaces:
Running
Running
ignore temp files
Browse files
main.py
CHANGED
@@ -99,7 +99,7 @@ async def classify_image(file: UploadFile = File(None)):
|
|
99 |
|
100 |
image = Image.open(io.BytesIO(image_data))
|
101 |
|
102 |
-
inputs =
|
103 |
|
104 |
with torch.no_grad():
|
105 |
logits = model(**inputs).logits
|
@@ -184,7 +184,7 @@ async def classify_images(request: ImageUrlsRequest):
|
|
184 |
continue
|
185 |
|
186 |
image = Image.open(io.BytesIO(image_data))
|
187 |
-
inputs =
|
188 |
|
189 |
with torch.no_grad():
|
190 |
logits = model(**inputs).logits
|
|
|
99 |
|
100 |
image = Image.open(io.BytesIO(image_data))
|
101 |
|
102 |
+
inputs = model(image)
|
103 |
|
104 |
with torch.no_grad():
|
105 |
logits = model(**inputs).logits
|
|
|
184 |
continue
|
185 |
|
186 |
image = Image.open(io.BytesIO(image_data))
|
187 |
+
inputs = model(image)
|
188 |
|
189 |
with torch.no_grad():
|
190 |
logits = model(**inputs).logits
|