Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,6 +7,12 @@ from compose import compose_video
|
|
| 7 |
import os
|
| 8 |
import shutil
|
| 9 |
import spaces
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
LANGUAGES = ["Gujarati", "Hindi", "English"]
|
| 12 |
|
|
@@ -33,14 +39,14 @@ def full_pipeline(script, language):
|
|
| 33 |
final_path = compose_video(video_segments)
|
| 34 |
return final_path
|
| 35 |
|
| 36 |
-
with gr.Blocks() as demo:
|
| 37 |
-
gr.Markdown("# Script to Cartoon Video Generator (Gujarati | Hindi | English)")
|
| 38 |
-
with gr.Row():
|
| 39 |
-
script_input = gr.Textbox(label="Enter Story or Script", lines=10)
|
| 40 |
-
|
| 41 |
-
gen_btn = gr.Button("Generate Cartoon Video")
|
| 42 |
-
output_video = gr.Video(label="Final Video")
|
| 43 |
-
|
| 44 |
-
gen_btn.click(full_pipeline, inputs=[script_input, lang_input], outputs=output_video)
|
| 45 |
-
|
| 46 |
-
demo.launch()
|
|
|
|
| 7 |
import os
|
| 8 |
import shutil
|
| 9 |
import spaces
|
| 10 |
+
from moviepy.editor import ImageClip, AudioFileClip
|
| 11 |
+
|
| 12 |
+
def test():
|
| 13 |
+
return "moviepy successfully imported"
|
| 14 |
+
|
| 15 |
+
|
| 16 |
|
| 17 |
LANGUAGES = ["Gujarati", "Hindi", "English"]
|
| 18 |
|
|
|
|
| 39 |
final_path = compose_video(video_segments)
|
| 40 |
return final_path
|
| 41 |
|
| 42 |
+
#with gr.Blocks() as demo:
|
| 43 |
+
#gr.Markdown("# Script to Cartoon Video Generator (Gujarati | Hindi | English)")
|
| 44 |
+
#with gr.Row():
|
| 45 |
+
#script_input = gr.Textbox(label="Enter Story or Script", lines=10)
|
| 46 |
+
# lang_input = gr.Dropdown(choices=LANGUAGES, label="Select Narration Language")
|
| 47 |
+
#gen_btn = gr.Button("Generate Cartoon Video")
|
| 48 |
+
#output_video = gr.Video(label="Final Video")
|
| 49 |
+
|
| 50 |
+
#gen_btn.click(full_pipeline, inputs=[script_input, lang_input], outputs=output_video)
|
| 51 |
+
demo = gr.Interface(fn=test, inputs=[], outputs="text")
|
| 52 |
+
demo.launch()
|