Upload app.py
Browse files
app.py
CHANGED
|
@@ -148,9 +148,9 @@ def lineart(img, res, coarse=False, invert=True):
|
|
| 148 |
from annotator.lineart import LineartDetector
|
| 149 |
model_lineart = LineartDetector()
|
| 150 |
# result = model_lineart(img, coarse)
|
| 151 |
-
if invert
|
| 152 |
result = cv2.bitwise_not(model_lineart(img, coarse))
|
| 153 |
-
else
|
| 154 |
result = model_lineart(img, coarse)
|
| 155 |
return [result]
|
| 156 |
|
|
|
|
| 148 |
from annotator.lineart import LineartDetector
|
| 149 |
model_lineart = LineartDetector()
|
| 150 |
# result = model_lineart(img, coarse)
|
| 151 |
+
if (invert):
|
| 152 |
result = cv2.bitwise_not(model_lineart(img, coarse))
|
| 153 |
+
else:
|
| 154 |
result = model_lineart(img, coarse)
|
| 155 |
return [result]
|
| 156 |
|