lsb commited on
Commit
a09c55b
1 Parent(s): a8bc6ca

green vs pink, bare bones

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -58,5 +58,10 @@ def flip(img):
58
  return np.flipud(img)
59
 
60
 
61
- iface = gr.Interface(flip, gr.Image(sources=["webcam"], streaming=True), "image", live=True)
 
 
 
 
 
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()