From 63bd7a5674ef3ed863282a0993fafb285d40bc92 Mon Sep 17 00:00:00 2001 From: Aisuko Date: Thu, 9 Nov 2023 00:54:25 +0000 Subject: [PATCH] remove annotations and add Enum Signed-off-by: GitHub --- extra/grpc/sam/sam.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/grpc/sam/sam.py b/extra/grpc/sam/sam.py index f413b6db..1afa9e92 100644 --- a/extra/grpc/sam/sam.py +++ b/extra/grpc/sam/sam.py @@ -1,8 +1,8 @@ #! /usr/bin/env python3 -from __future__ import annotations from concurrent import futures import argparse +from enum import Enum import os import signal import sys @@ -28,7 +28,7 @@ IMAGE_SIZE = 1024 VIT_PATCH_SIZE=16 # Enum for sam model type -class SamModelType: +class SamModelType(str, Enum): default = "sam_hq_vit_h.pth" vit_h = "sam_hq_vit_h.pth" vit_l = "sam_hq_vit_l.pth"