Spaces:
Runtime error
Runtime error
app.py
CHANGED
@@ -78,20 +78,20 @@ def engine(text_input):
|
|
78 |
img = gr.Interface.load("spaces/multimodalart/latentdiffusion")(ent[0],'50','256','256','1',10)[0]
|
79 |
img_list.append(img)
|
80 |
|
81 |
-
|
82 |
-
|
83 |
|
84 |
-
|
85 |
-
|
86 |
|
87 |
-
|
88 |
-
|
89 |
|
90 |
-
|
91 |
-
|
92 |
|
93 |
-
|
94 |
-
|
95 |
#{'prompt':text_input,'steps':'50','width':'256','height':'256','images':'1','scale':10}).launch()
|
96 |
#img_intfc = gr.Interface.load("spaces/multimodalart/latentdiffusion", inputs=[gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text")],
|
97 |
#outputs=[gr.outputs.Image(type="pil", label="output image"),gr.outputs.Carousel(label="Individual images",components=["image"]),gr.outputs.Textbox(label="Error")], )
|
|
|
78 |
img = gr.Interface.load("spaces/multimodalart/latentdiffusion")(ent[0],'50','256','256','1',10)[0]
|
79 |
img_list.append(img)
|
80 |
|
81 |
+
#Resizing all images produced to same size
|
82 |
+
resize_img_list = resize(img_list)
|
83 |
|
84 |
+
#Convert text to speech using facebook's latest model from HF hub
|
85 |
+
speech = text2speech(text_input)
|
86 |
|
87 |
+
#Calculate the desired frame per second based on given audio length and entities identified
|
88 |
+
fps= entities_num / 19 #length of audio file #13 / 19
|
89 |
|
90 |
+
#Convert string of images into a video
|
91 |
+
clip = images_to_video(fps, resize_img_list)
|
92 |
|
93 |
+
#Merge video and audio created above
|
94 |
+
merged_file = merge_audio_video(speech, clip)
|
95 |
#{'prompt':text_input,'steps':'50','width':'256','height':'256','images':'1','scale':10}).launch()
|
96 |
#img_intfc = gr.Interface.load("spaces/multimodalart/latentdiffusion", inputs=[gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text")],
|
97 |
#outputs=[gr.outputs.Image(type="pil", label="output image"),gr.outputs.Carousel(label="Individual images",components=["image"]),gr.outputs.Textbox(label="Error")], )
|