in2IN / app.py
pabloruizponce's picture
Base app created
e7a1e10
raw
history blame
725 Bytes
import gradio as gr
from in2in.utils.plot import plot_3d_motion
from in2in.utils.paramUtil import HML_KINEMATIC_CHAIN
from transformers import AutoModel
def generate(textI, texti1, texti2):
preds = model(textI, texti1, texti2)
plot_3d_motion("result.mp4", HML_KINEMATIC_CHAIN, preds, title="", fps=30)
return "result.mp4"
model = AutoModel.from_pretrained("pabloruizponce/in2IN", trust_remote_code=True)
demo = gr.Interface(fn=generate,
inputs=[gr.Text(label="Interaction Description"),
gr.Text(label="Individual1 Description"),
gr.Text(label="Individual2 Description")],
outputs=gr.Video())
demo.launch()