Spaces:
Runtime error
Runtime error
innitial commit
Browse files- .gitignore +1 -0
- app.py +16 -0
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
venv/
|
app.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
|
3 |
+
import gradio as gr
|
4 |
+
|
5 |
+
def quantize(val):
|
6 |
+
return (np.round(val / 255) * 255).astype(np.uint8)
|
7 |
+
|
8 |
+
|
9 |
+
def sepia(input_img):
|
10 |
+
output_img = list(map(quantize, input_img))
|
11 |
+
return output_img
|
12 |
+
|
13 |
+
|
14 |
+
iface = gr.Interface(sepia, "image", "pil")
|
15 |
+
|
16 |
+
iface.launch()
|