Daily Touch insights analyzer
Dailytouch123
·
AI & ML interests
import gradio as gr
from PIL import Image
import random
# Very simple placeholder "AI" that randomly assigns skin type for demo
def analyze_skin(image):
skin_types = ["Oily Skin", "Dry Skin", "Normal Skin", "Acne-Prone Skin"]
skin = random.choice(skin_types)
# Advice dictionary
advice = {
"Oily Skin": "Your skin looks oily. Use oil-control face wash and lightweight moisturizer.",
"Dry Skin": "Your skin looks dry. Use a hydrating cream and drink more water.",
"Normal Skin": "Your skin looks healthy! Keep a balanced skincare routine.",
"Acne-Prone Skin": "We see acne signs. Use gentle cleansers and acne treatment cream."
}
# Product recommendation (can be customized with your products/prices)
product_cards = {
"Oily Skin": "Wonder Oil Control Cream – ₦8,000 + ₦2,000 Delivery",
"Dry Skin": "Hydrating Glow Cream – ₦9,500 + ₦2,000 Delivery",
"Normal Skin": "Daily Balance Cream – ₦7,000 + ₦2,000 Delivery",
"Acne-Prone Skin": "Acne Clear Gel – ₦10,000 + ₦2,000 Delivery"
}
return f"**Result:** {skin}\n\n{advice[skin]}\n\n💡 Recommended: {product_cards[skin]}"
# Gradio UI
demo = gr.Interface(
fn=analyze_skin,
inputs=gr.Image(type="pil", label="Upload your face photo"),
outputs="markdown",
title="✨ AI Skin Care Analyzer",
description="Upload a selfie to get skin type analysis, skincare advice, and product recommendations."
)
demo.launch()