sunnychenxiwang commited on
Commit
2a93dd4
1 Parent(s): 974a42a
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -39,16 +39,16 @@
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()
 
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()