from model import model import gradio as gr import numpy as np def classify_image(image): probabilities = model.predict(image) # Call prediction function return probabilities demo = gr.Interface( fn=classify_image, inputs=gr.Image(), outputs=gr.Label(num_top_classes=4), title="Brain tumor image MRI classification", description="Convolutional neural network proprietary model made in Keras to classify brain MRI images in 4 categories: Glioma, Meningioma, Pituitary and No tumor. AI model and interface built by Eng. Michael Leonardo Aguas.",) demo.launch()