Update main.py
Browse files
main.py
CHANGED
@@ -188,9 +188,7 @@ class Model():
|
|
188 |
return ((y_tilde[0].cpu().numpy().transpose(1, 2, 0) + 1.0) * 127.5).astype(np.uint8), 'Successfully toonify the image with style of %s'%(self.style_name)
|
189 |
|
190 |
|
191 |
-
|
192 |
-
async def load_model():
|
193 |
-
global model
|
194 |
model = Model(device='cuda' if torch.cuda.is_available() else 'cpu')
|
195 |
|
196 |
from fastapi.responses import StreamingResponse
|
|
|
188 |
return ((y_tilde[0].cpu().numpy().transpose(1, 2, 0) + 1.0) * 127.5).astype(np.uint8), 'Successfully toonify the image with style of %s'%(self.style_name)
|
189 |
|
190 |
|
191 |
+
|
|
|
|
|
192 |
model = Model(device='cuda' if torch.cuda.is_available() else 'cpu')
|
193 |
|
194 |
from fastapi.responses import StreamingResponse
|