Spaces:
Runtime error
Runtime error
File size: 1,877 Bytes
1f5364b ad37ea0 1f5364b ad37ea0 1f5364b ad37ea0 1f5364b 96fab68 1f5364b |
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 |
##importing the libraries
from PIL import Image
import gradio as gr
from ultralytics import YOLO
# Load your trained model
model = YOLO('best.pt')
#Function for making predictions
def predict (image):
results = model(image)
for result in results:
im_array = result.plot()
im = Image.fromarray(im_array[..., ::-1]) # RGB PIL image
# im.show() # show image
# im.save('results.jpg')
return im
platform = gr.Interface( fn = predict,
title ="PTCADx: Computer-Aided Detection of Pneumothorax in Chest X-ray Images",
inputs = "image",
outputs = "image",
description="""
Introducing a revolutionary computer-aided detection tool designed to enhance the efficiency of clinicians in detecting pneumothorax in chest X-ray images.
""",
article = """
It is crucial to emphasize that while this tool serves as a valuable research aid,
it is not intended to replace clinical guidelines,
nor should it substitute for the wealth of clinical knowledge
and experience possessed by healthcare professionals.
The algorithm is meant to complement and support the diagnostic process,
providing an additional layer of analysis for consideration in conjunction with the clinician's expertise.
Users are encouraged to interpret the algorithm's output in conjunction with their clinical judgment,
and the tool should be viewed as a supplementary resource rather than a standalone diagnostic solution.
""" )
platform.launch(inline=True,share=True) |