CoolFace
Apppublic

rmulla/InfoLabs_Leukemia_Detector

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
app.py29 linesDownload Raw Back to root
1# -*- coding: utf-8 -*-2"""app.ipynb3 4Automatically generated by Colab.5 6Original file is located at7    https://colab.research.google.com/drive/1MPidQg_5e8-YncdqYrJqz9Om-SJrm4rT8"""9 10import gradio as gr11from ultralytics import YOLO12import cv213import numpy as np14 15model = YOLO("best.pt")16 17def detect_objects(image):18    results = model.predict(image, conf=0.5)19    return results[0].plot()20 21interface = gr.Interface(22    fn=detect_objects,23    inputs=gr.Image(type="numpy", label="Upload Image"),24    outputs=gr.Image(type="numpy", label="Detected Output"),25    title="Leukemia Cell Detection",26    description="Upload a microscope image to detect cell types using YOLOv8."27)28 29interface.launch()