pabloruizponce commited on
Commit
94f9c4a
·
verified ·
1 Parent(s): f1667c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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
- #model.to("cuda")
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"),