Update handler.py
Browse files- handler.py +5 -1
handler.py
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
-
from
|
|
|
2 |
import torch
|
|
|
|
|
|
|
3 |
|
4 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
5 |
|
|
|
1 |
+
from typing import Dict, List, Any
|
2 |
+
from PIL import Image
|
3 |
import torch
|
4 |
+
import base64
|
5 |
+
from io import BytesIO
|
6 |
+
from transformers import AutoImageProcessor, Swinv2Model
|
7 |
|
8 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
9 |
|