Spaces:
Running
Running
Update app.py
Browse files
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 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
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([])
|