import gradio as gr import cv2 import numpy as np # ---------------- FUNCTIONS ---------------- # def diamond_price(carat): price = int(carat * 85000) return f"Estimated Diamond Price: ₹{price:,}" def face_detect(image): if image is None: return None gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) face_cascade = cv2.CascadeClassifier( cv2.data.haarcascades + "haarcascade_frontalface_default.xml" ) faces = face_cascade.detectMultiScale(gray, 1.3, 5) for (x, y, w, h) in faces: cv2.rectangle(image, (x, y), (x + w, y + h), (0, 180, 255), 2) return image # ---------------- CREATIVE SAFE CSS ---------------- # css = """ body { background: linear-gradient(120deg, #fdf2f8, #eef2ff, #ecfeff); font-family: 'Segoe UI', sans-serif; color: #1e293b; } h1 { color: #4338ca; } h2 { color: #0f172a; } .card { background: white; border-radius: 16px; padding: 20px; box-shadow: 0 12px 30px rgba(0,0,0,0.08); margin-bottom: 20px; } .gr-button { background: linear-gradient(135deg, #6366f1, #ec4899); color: white; border-radius: 14px; font-weight: 600; } .gr-button:hover { box-shadow: 0 8px 20px rgba(236,72,153,0.35); } """ # ---------------- UI ---------------- # with gr.Blocks(css=css, title="Simranpreet Kaur | AI Portfolio") as demo: gr.Markdown("""
AI • Machine Learning • Computer Vision
📍 Fatehgarh Sahib, Punjab
📧 spreetkaur937@gmail.com
B.Tech Computer Science (2022–2026) student passionate about building intelligent and practical AI systems including prediction models and real-time computer vision applications.
Email: spreetkaur937@gmail.com
Hosted on Hugging Face Spaces