Spaces:
Runtime error
Runtime error
pabloruizponce
commited on
Commit
•
e7a1e10
1
Parent(s):
3349a56
Base app created
Browse files- .gitignore +1 -0
- app.py +17 -0
- requirements.txt +1 -0
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
*.mp4
|
app.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from in2in.utils.plot import plot_3d_motion
|
3 |
+
from in2in.utils.paramUtil import HML_KINEMATIC_CHAIN
|
4 |
+
from transformers import AutoModel
|
5 |
+
|
6 |
+
def generate(textI, texti1, texti2):
|
7 |
+
preds = model(textI, texti1, texti2)
|
8 |
+
plot_3d_motion("result.mp4", HML_KINEMATIC_CHAIN, preds, title="", fps=30)
|
9 |
+
return "result.mp4"
|
10 |
+
|
11 |
+
model = AutoModel.from_pretrained("pabloruizponce/in2IN", trust_remote_code=True)
|
12 |
+
demo = gr.Interface(fn=generate,
|
13 |
+
inputs=[gr.Text(label="Interaction Description"),
|
14 |
+
gr.Text(label="Individual1 Description"),
|
15 |
+
gr.Text(label="Individual2 Description")],
|
16 |
+
outputs=gr.Video())
|
17 |
+
demo.launch()
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
git+https://github.com/pabloruizponce/in2IN.git
|