File size: 440 Bytes
12f4358
 
 
 
07b2b6d
12f4358
 
6b74f1c
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
!pip install torch
!pip install transformers
import torch
from transformers import pipeline
model_name = skin_lesion_detection_model.h5  # Replace with the name or path of the pre-trained model
classifier = pipeline("text-classification", model=model_name)

image_path = "image.jpg"  # Replace with the path to your image
image = Image.open(image_path)
print("Predicted Label:", predicted_label)
print("Confidence Score:", predicted_score)