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 lines45678910111213141516171819202122232425262728291 unmodified line313233343536371 unmodified line394041424344453 unmodified lines---## Model Usageimport 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 efficiencypipe = pipeline("image-classification", model="itsTomLie/Jaundice_Classifier")# Convert NumPy array to PIL Image if necessaryif isinstance(image, np.ndarray):image = Image.fromarray(image.astype('uint8'))elif isinstance(image, str): # If image is a file pathimage = Image.open(image)# Perform predictionresult = pipe(image)# Extract label and confidencelabel = result[0]['label']confidence = result[0]['score']1 unmodified linereturn 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 ID3 unmodified lines456789101112131415161718192021222324251 unmodified line2728293031321 unmodified line343536373839403 unmodified lines---## Model Usage```import gradio as grfrom transformers import pipelinefrom PIL import Imageimport numpy as npdef predict_image(image):pipe = pipeline("image-classification", model="itsTomLie/Jaundice_Classifier")if isinstance(image, np.ndarray):image = Image.fromarray(image.astype('uint8'))elif isinstance(image, str):image = Image.open(image)result = pipe(image)label = result[0]['label']confidence = result[0]['score']1 unmodified linereturn label, confidenceinterface = 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