rsax commited on
Commit
5673fea
·
verified ·
1 Parent(s): 7241256

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -17,6 +17,7 @@ from matplotlib.animation import FuncAnimation, PillowWriter
17
  from mpl_toolkits.mplot3d import Axes3D
18
  from mpl_toolkits.mplot3d.art3d import Poly3DCollection
19
  from visualization.plot_3d_global import draw_to_batch
 
20
  import sys
21
  import os
22
  import warnings
@@ -96,18 +97,18 @@ def infer(text):
96
  return "Error generating GIF. Please try again."
97
 
98
  with gr.Blocks(css=".container { max-width: 800px; margin: auto; }") as demo:
99
- with gr.Column():
100
  gr.Markdown("## 3D Human Motion Generation")
101
- text_input = gr.Textbox(label="Enter the human action to generate", placeholder="Enter text description for the action here...")
102
- output_image = gr.Image(label="Generated Human Motion", type="filepath")
103
- submit_button = gr.Button("Generate Motion")
104
-
105
- submit_button.click(
106
- fn=infer,
107
- inputs=[text_input],
108
- outputs=[output_image]
109
- )
110
-
111
 
112
  if __name__ == "__main__":
113
  demo.launch()
 
17
  from mpl_toolkits.mplot3d import Axes3D
18
  from mpl_toolkits.mplot3d.art3d import Poly3DCollection
19
  from visualization.plot_3d_global import draw_to_batch
20
+ import imageio
21
  import sys
22
  import os
23
  import warnings
 
97
  return "Error generating GIF. Please try again."
98
 
99
  with gr.Blocks(css=".container { max-width: 800px; margin: auto; }") as demo:
100
+ with gr.Column(elem_id="col-container"):
101
  gr.Markdown("## 3D Human Motion Generation")
102
+ with gr.Row():
103
+ text_input = gr.Textbox(label="Enter the human action to generate", placeholder="Enter text description for the action here...", show_label=False, max_lines=1, container=False)
104
+ submit_button = gr.Button("Generate Motion")
105
+ output_image = gr.Image(label="Generated Human Motion", type="filepath", show_label=False)
106
+
107
+ submit_button.click(
108
+ fn=infer,
109
+ inputs=[text_input],
110
+ outputs=[output_image]
111
+ )
112
 
113
  if __name__ == "__main__":
114
  demo.launch()