ysharma HF staff commited on
Commit
defe9d7
·
1 Parent(s): a4f9546
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -151,6 +151,9 @@ def engine(text_input):
151
  mergedclip = merge_audio_video(entities_num, resize_img_list, text_input)
152
  print('Back in engine')
153
  print(' merged clip type :',type(mergedclip))
 
 
 
154
  #{'prompt':text_input,'steps':'50','width':'256','height':'256','images':'1','scale':10}).launch()
155
  #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")],
156
  #outputs=[gr.outputs.Image(type="pil", label="output image"),gr.outputs.Carousel(label="Individual images",components=["image"]),gr.outputs.Textbox(label="Error")], )
@@ -167,7 +170,7 @@ def engine(text_input):
167
  #run(prompt, steps, width, height, images, scale)
168
 
169
 
170
- return mergedclip #img, entities, speech
171
 
172
  #image = gr.outputs.Image(type="pil", label="output image")
173
  app = gr.Interface(engine,
 
151
  mergedclip = merge_audio_video(entities_num, resize_img_list, text_input)
152
  print('Back in engine')
153
  print(' merged clip type :',type(mergedclip))
154
+ print('Writing the merged video clip to a file')
155
+ mergedclip.write_videofile('mergedvideo.mp4')
156
+ print('mergedvideo.mp4 created')
157
  #{'prompt':text_input,'steps':'50','width':'256','height':'256','images':'1','scale':10}).launch()
158
  #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")],
159
  #outputs=[gr.outputs.Image(type="pil", label="output image"),gr.outputs.Carousel(label="Individual images",components=["image"]),gr.outputs.Textbox(label="Error")], )
 
170
  #run(prompt, steps, width, height, images, scale)
171
 
172
 
173
+ return ('mergedvideo.mp4') #img, entities, speech
174
 
175
  #image = gr.outputs.Image(type="pil", label="output image")
176
  app = gr.Interface(engine,