Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,13 +4,14 @@ from in2in.utils.plot import plot_3d_motion
|
|
4 |
from in2in.utils.paramUtil import HML_KINEMATIC_CHAIN
|
5 |
from transformers import AutoModel
|
6 |
|
|
|
7 |
def generate(textI, texti1, texti2):
|
8 |
preds = model(textI, texti1, texti2)
|
9 |
plot_3d_motion("result.mp4", HML_KINEMATIC_CHAIN, preds, title="", fps=30)
|
10 |
return "result.mp4"
|
11 |
|
12 |
model = AutoModel.from_pretrained("pabloruizponce/in2IN", trust_remote_code=True)
|
13 |
-
|
14 |
demo = gr.Interface(fn=generate,
|
15 |
inputs=[gr.Text(label="Interaction Description"),
|
16 |
gr.Text(label="Individual1 Description"),
|
|
|
4 |
from in2in.utils.paramUtil import HML_KINEMATIC_CHAIN
|
5 |
from transformers import AutoModel
|
6 |
|
7 |
+
@gpu
|
8 |
def generate(textI, texti1, texti2):
|
9 |
preds = model(textI, texti1, texti2)
|
10 |
plot_3d_motion("result.mp4", HML_KINEMATIC_CHAIN, preds, title="", fps=30)
|
11 |
return "result.mp4"
|
12 |
|
13 |
model = AutoModel.from_pretrained("pabloruizponce/in2IN", trust_remote_code=True)
|
14 |
+
model.to("cuda")
|
15 |
demo = gr.Interface(fn=generate,
|
16 |
inputs=[gr.Text(label="Interaction Description"),
|
17 |
gr.Text(label="Individual1 Description"),
|