23f1000805's picture
deploy face_expr_v3_frozen cv 0.6937
5d9302b verified
Raw History Blame Contribute Delete
604 Bytes
import pandas as pd
import gradio as gr
from inference import ExpressionMatcher
MODEL = ExpressionMatcher("23f1000805/face-expression-v3")
def run(path):
df = pd.read_csv(path)
return MODEL.predict_table(df)
demo = gr.Interface(
run,
gr.File(label="features.csv with 10 photos per person", type="filepath"),
gr.Dataframe(label="matched expressions"),
title="Face expression matcher",
description="Upload the Py-Feat feature csv of one or more people (10 photos each, with a person_id column if there are several people).",
)
if __name__ == "__main__":
demo.launch()