Fix EndpointHandler class name and remove PIL dependencies
Browse files- handler.py +2 -5
handler.py
CHANGED
|
@@ -3,12 +3,9 @@ import sys
|
|
| 3 |
import json
|
| 4 |
import torch
|
| 5 |
import numpy as np
|
| 6 |
-
from PIL import Image, ImageDraw
|
| 7 |
-
import io
|
| 8 |
-
import base64
|
| 9 |
from typing import Dict, Any, List
|
| 10 |
|
| 11 |
-
class
|
| 12 |
def __init__(self, path=""):
|
| 13 |
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 14 |
|
|
@@ -357,4 +354,4 @@ class DiffSketchEditHandler:
|
|
| 357 |
return svg_content
|
| 358 |
|
| 359 |
# Create handler instance
|
| 360 |
-
handler =
|
|
|
|
| 3 |
import json
|
| 4 |
import torch
|
| 5 |
import numpy as np
|
|
|
|
|
|
|
|
|
|
| 6 |
from typing import Dict, Any, List
|
| 7 |
|
| 8 |
+
class EndpointHandler:
|
| 9 |
def __init__(self, path=""):
|
| 10 |
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 11 |
|
|
|
|
| 354 |
return svg_content
|
| 355 |
|
| 356 |
# Create handler instance
|
| 357 |
+
handler = EndpointHandler()
|