Update handler.py
Browse files- handler.py +0 -10
handler.py
CHANGED
|
@@ -30,16 +30,6 @@ except ImportError:
|
|
| 30 |
device = 0 if torch.cuda.is_available() else -1
|
| 31 |
|
| 32 |
|
| 33 |
-
|
| 34 |
-
inputs = processor.apply_chat_template(
|
| 35 |
-
conversation,
|
| 36 |
-
add_generation_prompt=True,
|
| 37 |
-
tokenize=True,
|
| 38 |
-
return_dict=True,
|
| 39 |
-
return_tensors="pt"
|
| 40 |
-
).to(device)
|
| 41 |
-
|
| 42 |
-
|
| 43 |
class Utils:
|
| 44 |
def convert_base64_to_jpg(base64_string):
|
| 45 |
image_data = base64.b64decode(base64_string)
|
|
|
|
| 30 |
device = 0 if torch.cuda.is_available() else -1
|
| 31 |
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
class Utils:
|
| 34 |
def convert_base64_to_jpg(base64_string):
|
| 35 |
image_data = base64.b64decode(base64_string)
|