Skip to content

Commit

Permalink
feat(tagger): ✨ add support for DETR_RESNET_50_MODEL_PATH environme…
Browse files Browse the repository at this point in the history
…nt variable
  • Loading branch information
Dan6erbond committed May 14, 2023
1 parent 29dce21 commit 6ed0224
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tagger/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@

client = PocketBase(os.getenv("POCKETBASE_URL"))

processor = DetrImageProcessor.from_pretrained("facebook/detr-resnet-50")
model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-50")
model_name_or_path = os.getenv("DETR_RESNET_50_MODEL_PATH", "facebook/detr-resnet-50")
processor = DetrImageProcessor.from_pretrained(model_name_or_path)
model = DetrForObjectDetection.from_pretrained(model_name_or_path)


def get_auth_token(email, password):
Expand Down Expand Up @@ -76,5 +77,6 @@ def start_tag_file(file_id):

return {"file": file_id, "model": "facebook/detr-resnet-50"}, 202


if __name__ == "__main__":
app.run()

0 comments on commit 6ed0224

Please sign in to comment.