Weaita commited on
Commit
b245327
·
1 Parent(s): 23f629e

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import numpy as np
3
+ from PIL import Image
4
+
5
+ def invert_image(image):
6
+ image = Image.open(image)
7
+ inverted_image = Image.fromarray(np.array(image)[::-1])
8
+ return inverted_image
9
+
10
+ iface = gr.Interface(invert_image, "image", "image", live=True)
11
+ iface.launch()