This model will help in identifying if it is a lung ct scan or a brain ct scan. Recommended to use with fast.ai library!

STEPS:

  1. Download from the files area.
  2. import into your HuggingFace Repository.
  3. Install fast.ai (pip install fastai), from fastbook import *
  4. **load_learner('mode.pkl'), declare it to a variable. e.g: model = load_learner('mode.pkl')
  5. use, the variable declared, in this case, model, model.predict(input_image)
  6. For any queries, use this as a source code:

import gradio as gr from fastai.vision.all import * from fastbook import * def predict(input_img): categories = ('brain', 'lung') learn = load_learner('mode.pkl') pred,idx,probs = learn.predict(input_img) return dict(zip(categories, map(float,probs)))

label = gr.Label() gradio_app = gr.Interface( fn=predict, inputs=gr.Image(label="Select Image", sources=['upload', 'webcam'], type="pil"), outputs=label, title="Lung or Brain?", examples = ["brain.jpg","brainct.jpeg","images.jpeg","ctlung2.jpeg","images (1).jpeg"] )

if name == "main": gradio_app.launch()

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support