test1 / app.py
yiyueyiming's picture
在 launch 方法中添加 share=True 参数, Gradio 会自动创建一个临时的公共 URL
6318809
raw
history blame contribute delete
224 Bytes
import gradio as gr
import cv2
def to_black(image):
output = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
return output
interface = gr.Interface(fn=to_black, inputs="image", outputs="image")
interface.launch(share=True)