cyrilw commited on
Commit
96ccfb5
·
1 Parent(s): 6ba3453

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import gradio as gr
3
+
4
+ def sepia(image):
5
+ sepia_filter = np.array(
6
+ [[0.393, 0.769, 0.189],
7
+ [0.349, 0.686, 0.168],
8
+ [0.272, 0.534, 0.131]]
9
+ )
10
+ sepia_img = image.dot(sepia_filter.T)
11
+ sepia_img /= sepia_img.max()
12
+ return sepia_img
13
+
14
+ # Write 1 line of Python to create a simple GUI
15
+ gr.Interface(fn=sepia, inputs="image", outputs="image").launch()