import gradio as gr from predict import makepredictions with gr.Blocks() as demo: gr.Markdown("Brain Tumor Image classification") gr.Markdown("We detect 4 Types of Tumor with 99.12% Accuracy:") gr.Markdown("Glioma | Meningioma | No Tumor | Pituitary") image_input = gr.Image(label='Tumor Image', type='filepath', height=480) with gr.Row(): image_button = gr.Button("Predict") y_pred = output = gr.Textbox(label="Tumor Type:") image_button.click(makepredictions, inputs=image_input, outputs=y_pred) gr.Markdown( """ This model is trained on the Kaggle dataset: - Only for the educational purpose - Play with that and Have fun. """) if __name__ == "__main__": demo.launch()