Spaces:
Sleeping
Sleeping
antunkarlovac
commited on
Commit
•
0954236
1
Parent(s):
16c99ea
app.py
Browse files
app.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
|
3 |
+
def sepia(image):
|
4 |
+
sepia_filter = np.array(
|
5 |
+
[[0.393, 0.769, 0.189],
|
6 |
+
[0.349, 0.686, 0.168],
|
7 |
+
[0.272, 0.534, 0.131]]
|
8 |
+
)
|
9 |
+
sepia_img = image.dot(sepia_filter.T)
|
10 |
+
sepia_img /= sepia_img.max()
|
11 |
+
return sepia_img
|
12 |
+
|
13 |
+
|
14 |
+
import gradio as gr
|
15 |
+
|
16 |
+
# Write 1 line of Python to create a simple GUI
|
17 |
+
gr.Interface(fn=sepia, inputs="image", outputs="image").launch();
|