Alcina commited on
Commit
6b74f1c
·
1 Parent(s): 2649703

Rename predict to predict.py

Browse files
Files changed (1) hide show
  1. predict → predict.py +4 -4
predict → predict.py RENAMED
@@ -5,7 +5,7 @@ from transformers import pipeline
5
  model_name = skin_lesion_detection_model.h5 # Replace with the name or path of the pre-trained model
6
  classifier = pipeline("text-classification", model=model_name)
7
 
8
- text = "Skin lesion description" # Replace with the skin lesion description you want to predict
9
- prediction = classifier(text)[0]
10
- predicted_label = prediction["label"]
11
- predicted_score = prediction["score"]
 
5
  model_name = skin_lesion_detection_model.h5 # Replace with the name or path of the pre-trained model
6
  classifier = pipeline("text-classification", model=model_name)
7
 
8
+ image_path = "image.jpg" # Replace with the path to your image
9
+ image = Image.open(image_path)
10
+ print("Predicted Label:", predicted_label)
11
+ print("Confidence Score:", predicted_score)