import gradio as gr from yolo.yoloFace import YOLO_FACE from vgg.vgg_face import MODEL_FACE from database.retriever import BruteForceStore import cv2 # Initialize the database DB = BruteForceStore() def pipeline(img): images = YOLO_FACE(img) for patch in images: embeddings = MODEL_FACE(patch) if DB(embeddings): return "Welcome!" return "Unauthorised" # Define a Gradio interface def process_image(image): if image is None: return "Please upload an image." result = pipeline(image) return result # Gradio App with gr.Blocks() as demo: gr.Markdown("""