Spaces:
Sleeping
Sleeping
File size: 2,427 Bytes
437e081 539be38 437e081 539be38 437e081 539be38 437e081 79de66f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
import gradio as gr
from predict import makepredictions, xray_predict
from tumorseg import make_segmentation
with gr.Blocks() as demo:
with gr.Tab('Brain Tumor | Tumor Segmentation'):
gr.Markdown("""
<div align='center'>Tumor segmentations
</div>
<div align='center'>
> You could segment you mri image. I hope it will find you well
</div>
""")
with gr.Row():
image_input = gr.Image(label='Tumor Image', type='filepath', height=480, interactive=True)
output_image = gr.Image(label='label Segmented Image', height=480, interactive=False)
image_button = gr.Button("Segment image")
image_button.click(make_segmentation, inputs=image_input, outputs=output_image)
with gr.Tab('Brain Tumor | Tumor Classification'):
gr.Markdown("""
<div align='center'>
Brain Tumor Image classification
</div>
<div align='center'>
>We detect 4 Types of Tumor with 99.12% Accuracy:
>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 = gr.Textbox(label="Tumor Type:")
image_button.click(makepredictions, inputs=image_input, outputs=y_pred)
with gr.Tab('Chest X-ray | COVID19, NORMAL, PNEUMONIA,TURBERCULOSIS'):
gr.Markdown("""
<div align='center'>Chest X-ray classifications
</div>
<div align='center'>
> We COVID19, NORMAL, PNEUMONIA,TURBERCULOSIS from your chest x-ray image
</div>
""")
image_input = gr.Image(label='Chest X-ray', type='filepath', height=480)
with gr.Row():
image_button = gr.Button("Predict")
y_pred = gr.Textbox(label="Disease :")
image_button.click(xray_predict, inputs=image_input, outputs=[y_pred])
gr.Markdown(
"""
<div align='center'>
These model is trained on the Kaggle dataset:
</div>
<div align='center'>
> Only for the educational purpose
> Play with that and Have fun.
</div>
""")
demo.launch()
|