Boaz commited on
Commit
d860b21
·
1 Parent(s): 33ed82e
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ def sepia(image):
3
+ sepia_filter = np.array(
4
+ [[0.393, 0.769, 0.189],
5
+ [0.349, 0.686, 0.168],
6
+ [0.272, 0.534, 0.131]]
7
+ )
8
+ sepia_img = image.dot(sepia_filter.T)
9
+ sepia_img /= sepia_img.max()
10
+ return sepia_img
11
+
12
+
13
+
14
+ import gradio as gr
15
+ gr.Interface(fn=sepia, inputs =“image”, outputs = “image”).launch();
16
+