Jaykintecblic
commited on
Commit
•
8c9844e
1
Parent(s):
9a42ebe
Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -5,7 +5,7 @@ from transformers import AutoModelForCausalLM, AutoProcessor
|
|
5 |
from transformers.image_utils import to_numpy_array, PILImageResampling, ChannelDimension
|
6 |
from transformers.image_transforms import resize, to_channel_dimension_format
|
7 |
|
8 |
-
class
|
9 |
def __init__(self, model_path: str, api_token: str):
|
10 |
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
11 |
self.processor = AutoProcessor.from_pretrained(
|
|
|
5 |
from transformers.image_utils import to_numpy_array, PILImageResampling, ChannelDimension
|
6 |
from transformers.image_transforms import resize, to_channel_dimension_format
|
7 |
|
8 |
+
class EndpointHandler:
|
9 |
def __init__(self, model_path: str, api_token: str):
|
10 |
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
11 |
self.processor = AutoProcessor.from_pretrained(
|