(history, text, motion_uploaded, data_stored, method)
| 174 | |
| 175 | |
| 176 | def add_text(history, text, motion_uploaded, data_stored, method): |
| 177 | data_stored = data_stored + [{'user_input': text}] |
| 178 | |
| 179 | if 'file' in motion_uploaded.keys(): |
| 180 | text = Text_Components.format(msg=text) |
| 181 | motion_uploaded = load_motion(motion_uploaded, method) |
| 182 | output_mp4_path = motion_uploaded['motion_video'] |
| 183 | video_fname = motion_uploaded['motion_video_fname'] |
| 184 | output_npy_path = motion_uploaded['motion_joints'] |
| 185 | joints_fname = motion_uploaded['motion_joints_fname'] |
| 186 | |
| 187 | text = text + Video_Components.format(video_path=output_mp4_path, |
| 188 | video_fname=video_fname, |
| 189 | motion_path=output_npy_path, |
| 190 | motion_fname=joints_fname) |
| 191 | else: |
| 192 | text = f"""<h3>{text}</h3>""" |
| 193 | history = history + [(text, None)] |
| 194 | return history, gr.update(value="", |
| 195 | interactive=False), motion_uploaded, data_stored |
| 196 | |
| 197 | |
| 198 | def add_audio(history, audio_path, data_stored): |
nothing calls this directly
no test coverage detected