Spaces:
Sleeping
Sleeping
Commit ·
6318809
1
Parent(s): 7a6db1f
在 launch 方法中添加 share=True 参数, Gradio 会自动创建一个临时的公共 URL
Browse files
app.py
CHANGED
|
@@ -4,5 +4,6 @@ import cv2
|
|
| 4 |
def to_black(image):
|
| 5 |
output = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
|
| 6 |
return output
|
|
|
|
| 7 |
interface = gr.Interface(fn=to_black, inputs="image", outputs="image")
|
| 8 |
-
interface.launch(
|
|
|
|
| 4 |
def to_black(image):
|
| 5 |
output = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
|
| 6 |
return output
|
| 7 |
+
|
| 8 |
interface = gr.Interface(fn=to_black, inputs="image", outputs="image")
|
| 9 |
+
interface.launch(share=True)
|