Spaces:
Running
Running
import gradio | |
from transformers import AutoImageProcessor, MobileNetV2Model | |
import torch | |
from datasets import load_dataset | |
image_processor = AutoImageProcessor.from_pretrained("Aruno/gemini-beauty") | |
model = MobileNetV2Model.from_pretrained("Aruno/gemini-beauty") | |
def inference(img): | |
inputs = image_processor(img, return_tensors="pt") | |
with torch.no_grad(): | |
outputs = model(**inputs) | |
return outputs | |
iface = gradio.Interface( | |
fn=inference, | |
inputs='image', | |
outputs='image', | |
title='Your Attractivness', | |
description='Check your attractivness', | |
examples=["face_01.jpg", "face_02.jpg"]) | |
iface.launch() |