Spaces:
Sleeping
Sleeping
sunnychenxiwang
commited on
Commit
•
974a42a
1
Parent(s):
8dc4699
my app
Browse files
app.py
CHANGED
@@ -39,22 +39,21 @@
|
|
39 |
|
40 |
import numpy as np
|
41 |
import gradio as gr
|
42 |
-
def sepia(input_img):
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
# #shape设置输入图像大小
|
53 |
# demo = gr.Interface(sepia, gr.Image(), "image")
|
54 |
# demo.launch()
|
55 |
|
56 |
# Download human-readable labels for ImageNet.
|
57 |
|
58 |
-
gr.Interface(fn=sepia,
|
59 |
-
inputs=gr.Image(type="pil")).launch()
|
60 |
|
|
|
39 |
|
40 |
import numpy as np
|
41 |
import gradio as gr
|
42 |
+
# def sepia(input_img):
|
43 |
+
# #处理图像
|
44 |
+
# sepia_filter = np.array([
|
45 |
+
# [0.393, 0.769, 0.189],
|
46 |
+
# [0.349, 0.686, 0.168],
|
47 |
+
# [0.272, 0.534, 0.131]
|
48 |
+
# ])
|
49 |
+
# sepia_img = input_img.dot(sepia_filter.T)
|
50 |
+
# sepia_img /= sepia_img.max()
|
51 |
+
# return sepia_img
|
52 |
# #shape设置输入图像大小
|
53 |
# demo = gr.Interface(sepia, gr.Image(), "image")
|
54 |
# demo.launch()
|
55 |
|
56 |
# Download human-readable labels for ImageNet.
|
57 |
|
58 |
+
gr.Interface(fn=sepia,inputs=gr.Image(type="pil")).launch()
|
|
|
59 |
|