File size: 725 Bytes
e7a1e10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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()