Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit

Permalink
Update image_query_classification.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jonafeucht committed Jun 12, 2024
1 parent 8513221 commit 43922c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/api/image_query_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ async def image_query_classification(
# Read the file as bytes
contents = await file.read()

classifier = check_model(model_name)

for model_name in model_names:
_score = score or default_score

try:
classifier = check_model(model_name)

# Check if the image is in fact an image
try:
img = Image.open(io.BytesIO(contents))
Expand Down

0 comments on commit 43922c4

Please sign in to comment.