Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- .ipynb_checkpoints/main-checkpoint.py +5 -2
- main.py +5 -2
.ipynb_checkpoints/main-checkpoint.py
CHANGED
@@ -5,8 +5,11 @@ pipeline = pipeline("image-classification", model="jhoppanne/SkinCancerClassifie
|
|
5 |
|
6 |
def predict(input_img):
|
7 |
pred = pipeline(input_img)
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
10 |
return answer
|
11 |
|
12 |
gradio_app = gr.Interface(
|
|
|
5 |
|
6 |
def predict(input_img):
|
7 |
pred = pipeline(input_img)
|
8 |
+
labels = ['Benign','Indeterminate','Malignant']
|
9 |
+
label_id = int(pred[0]['label'])
|
10 |
+
label = labels[label_id]
|
11 |
+
score = pred[0]['score']
|
12 |
+
answer = f'We predict that you have {label} type of skin cancer,\nwith confidence score of : {score*100:.2f}%'
|
13 |
return answer
|
14 |
|
15 |
gradio_app = gr.Interface(
|
main.py
CHANGED
@@ -5,8 +5,11 @@ pipeline = pipeline("image-classification", model="jhoppanne/SkinCancerClassifie
|
|
5 |
|
6 |
def predict(input_img):
|
7 |
pred = pipeline(input_img)
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
10 |
return answer
|
11 |
|
12 |
gradio_app = gr.Interface(
|
|
|
5 |
|
6 |
def predict(input_img):
|
7 |
pred = pipeline(input_img)
|
8 |
+
labels = ['Benign','Indeterminate','Malignant']
|
9 |
+
label_id = int(pred[0]['label'])
|
10 |
+
label = labels[label_id]
|
11 |
+
score = pred[0]['score']
|
12 |
+
answer = f'We predict that you have {label} type of skin cancer,\nwith confidence score of : {score*100:.2f}%'
|
13 |
return answer
|
14 |
|
15 |
gradio_app = gr.Interface(
|