ecandeloro's picture
Update app.py
fc643ca verified
raw
history blame
1.57 kB
import gradio as gr
examples = [
["Nevus_NCI.jpg"],
["melanoma_example.jpg"],
# Add more images as needed
]
# Title and description
title = "Skin Cancer Image Classification"
description = """
This app classifies skin cancer images into different categories using a pre-trained model. 🖼️✨
Upload your own image or use one of the examples to see the results.
"""
# Add a disclaimer
disclaimer = """
**Disclaimer:**
⚠️ *This demo is for educational and informational purposes only. It is **not** intended to provide a medical diagnosis, nor should it be considered a substitute for professional medical advice, diagnosis, or treatment. We are not liable for any misclassification of skin cancer images. If you have concerns about your health, please consult a healthcare professional.*
**Avviso legale:**
⚠️ *Questa demo è solo a scopo educativo e informativo. **Non** è intesa a fornire una diagnosi medica, né deve essere considerata un sostituto di un consulto medico professionale, una diagnosi o un trattamento. Non siamo responsabili per eventuali errori nella classificazione delle immagini di cancro della pelle. Se hai preoccupazioni sulla tua salute, consulta un professionista sanitario.*
"""
# Load the model and launch the app with title, description, examples, and disclaimer
demo = gr.load("models/Anwarkh1/Skin_Cancer-Image_Classification", examples=examples, title=title, description=description)
# Add Markdown with disclaimer
with gr.Blocks() as app:
demo.launch()
gr.Markdown(disclaimer)
app.launch()