green vs pink, bare bones
Browse files
app.py
CHANGED
@@ -58,5 +58,10 @@ def flip(img):
|
|
58 |
return np.flipud(img)
|
59 |
|
60 |
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
62 |
iface.launch()
|
|
|
58 |
return np.flipud(img)
|
59 |
|
60 |
|
61 |
+
def app(img):
|
62 |
+
npimg = np.array(img)
|
63 |
+
img = Image.fromarray(np.stack([npimg[:, :, 0], 255 - npimg[:,:,1], npimg[:,:,2]], axis=-1))
|
64 |
+
return img
|
65 |
+
|
66 |
+
iface = gr.Interface(app, gr.Image(sources=["webcam"], streaming=True), "image", live=True)
|
67 |
iface.launch()
|