YANGYYYY commited on
Commit
a59311c
·
verified ·
1 Parent(s): b4e2354

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -10
app.py CHANGED
@@ -1,17 +1,18 @@
1
  import numpy as np
2
  import gradio as gr
3
  import cv2
 
4
 
5
- def to_black(image, transfer_style):
6
- if transfer_style == "Hayao":
7
- output = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)# 转换为灰度图像
8
- return output
9
- elif transfer_style == "Shinkai":
10
- return image
11
- elif transfer_style == "Kon Satoshi":
12
- return image
13
- else:
14
- return image
15
 
16
  def clear_output(input_widget):
17
  input_widget = np.array([])
 
1
  import numpy as np
2
  import gradio as gr
3
  import cv2
4
+ from black import to_black
5
 
6
+ # def to_black(image, transfer_style):
7
+ # if transfer_style == "Hayao":
8
+ # output = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)# 转换为灰度图像
9
+ # return output
10
+ # elif transfer_style == "Shinkai":
11
+ # return image
12
+ # elif transfer_style == "Kon Satoshi":
13
+ # return image
14
+ # else:
15
+ # return image
16
 
17
  def clear_output(input_widget):
18
  input_widget = np.array([])