import gradio as gr from model import Model m = Model() with gr.Blocks() as app: gr.Markdown("app") with gr.Tab("Toxic Image Detector"): image_input_toxic = gr.Image() image_output_toxic = gr.Label(num_top_classes=2) image_button_toxic = gr.Button("image_toxic") # image image_button_toxic.click(m.image_toxic_detect, inputs=image_input_toxic, outputs=image_output_toxic) demo.launch(server_name="0.0.0.0")