Run this model with HF Jobs
Run itsTomLie/Jaundice_Classifier on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/itsTomLie/Jaundice_Classifier. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/itsTomLie/Jaundice_Classifier on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use itsTomLie/Jaundice_Classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use itsTomLie/Jaundice_Classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="itsTomLie/Jaundice_Classifier") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("itsTomLie/Jaundice_Classifier") model = AutoModelForImageClassification.from_pretrained("itsTomLie/Jaundice_Classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files3 unmodified lines456789101112121314141517161720181920232122262324251 unmodified line272829343031321 unmodified line34353642373839403 unmodified lines---
## Model Usage```import gradio as grfrom transformers import pipelinefrom PIL import Imageimport numpy as np
### Define function to perform inferencedef predict_image(image): # Initialize the pipeline outside the function if possible for efficiency pipe = pipeline("image-classification", model="itsTomLie/Jaundice_Classifier")
# Convert NumPy array to PIL Image if necessary if isinstance(image, np.ndarray): image = Image.fromarray(image.astype('uint8')) elif isinstance(image, str): # If image is a file path elif isinstance(image, str): image = Image.open(image)
# Perform prediction result = pipe(image)
# Extract label and confidence label = result[0]['label'] confidence = result[0]['score']
1 unmodified line
return label, confidence
### Create Gradio interfaceinterface = gr.Interface( fn=predict_image, inputs=gr.Image(type="numpy", label="Upload an Image"),1 unmodified line)
interface.launch(debug=True)
```
# Model Card for Model ID
README.md+3-8