import gradio as gr | |
import cv2 | |
import os | |
def to_black(image): | |
output = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) | |
key = os.getenv("TUSHARE_TOKEN") | |
return output, key | |
kk = gr.Textbox(label="S: ", lines=5) | |
img = gr.outputs.Image(type='numpy') | |
interface = gr.Interface(fn=to_black, inputs="image", outputs=[img,kk]) | |
interface.launch() |