TDN-M commited on
Commit
c7ec472
·
verified ·
1 Parent(s): 55bd1de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -1
app.py CHANGED
@@ -170,4 +170,29 @@ def interface():
170
  inputs=[text_input, voice_select],
171
  outputs=[audio_output, download_audio])
172
 
173
- with gr.Tab
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  inputs=[text_input, voice_select],
171
  outputs=[audio_output, download_audio])
172
 
173
+ with gr.Tab
174
+ ("Tạo Video"):
175
+ script_input = gr.Textbox(label="Nhập kịch bản cho video")
176
+ dataset_path = gr.Textbox(
177
+ label="Đường dẫn đến dataset ảnh",
178
+ placeholder="Để trống nếu không sử dụng dataset")
179
+ use_dataset = gr.Checkbox(label="Sử dụng dataset ảnh")
180
+ audio_file = gr.File(label="Chọn file âm thanh", type="filepath")
181
+ create_video_button = gr.Button("Tạo Video")
182
+ video_output = gr.Video(label="Video tạo ra")
183
+ download_video = gr.File(label="Tải xuống file video",
184
+ interactive=False)
185
+
186
+ create_video_button.click(fn=create_video_func,
187
+ inputs=[
188
+ script_input, audio_file, dataset_path,
189
+ use_dataset
190
+ ],
191
+ outputs=[video_output, download_video])
192
+
193
+ return app
194
+
195
+ # Khởi chạy ứng dụng
196
+ if __name__ == "__main__":
197
+ app = interface()
198
+ app.launch()