license: apache-2.0
---import gradio as gr
from transformers import pipeline
Carregar modelos
face_detector = pipeline("image-classification", model="dima806/man_woman_face_image_detection")
gender_classifier = pipeline("image-classification", model="AjaySharma/genderDetection")
def process_image(image):
# Detecção de rosto e gênero
face_result = face_detector(image)
gender_result = gender_classifier(image)
return face_result, gender_result
Interface Gradio
iface = gr.Interface(fn=process_image, inputs="image", outputs=["json", "json"])
iface.launch()