jonathanjordan21 commited on
Commit
aef4fb0
1 Parent(s): 27b206c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -28,7 +28,7 @@ def pred(product_name, orientation):
28
  folder_name, sentences = pexels.generate_videos(product_name, pexels_api_key, orientation, llm_chain, sum_llm_chain)
29
  utils.combine_videos(folder_name)
30
  return {
31
- 'video':folder_name,
32
  'captions':"\n".join(sentences)
33
  }
34
 
@@ -36,8 +36,8 @@ with gr.Blocks() as demo:
36
  dimension = gr.Dropdown(
37
  ["Potrait", "Landscape", "Square"], label="Video Dimension", info="Choose orientation"
38
  )
39
- product_name = gr.Textbox(placeholder="Product Name")
40
- captions = gr.Textbox()
41
  video = gr.Video()
42
  btn = gr.Button("Submit")
43
  btn.click(pred, inputs=[product_name, dimension], outputs=[captions,video])
 
28
  folder_name, sentences = pexels.generate_videos(product_name, pexels_api_key, orientation, llm_chain, sum_llm_chain)
29
  utils.combine_videos(folder_name)
30
  return {
31
+ 'video':os.path.join(folder_name, "Final_Ad_Video.mp4"),
32
  'captions':"\n".join(sentences)
33
  }
34
 
 
36
  dimension = gr.Dropdown(
37
  ["Potrait", "Landscape", "Square"], label="Video Dimension", info="Choose orientation"
38
  )
39
+ product_name = gr.Textbox(label="Product Name")
40
+ captions = gr.Textbox(label="captions")
41
  video = gr.Video()
42
  btn = gr.Button("Submit")
43
  btn.click(pred, inputs=[product_name, dimension], outputs=[captions,video])