Spaces:
Runtime error
Runtime error
jonathanjordan21
commited on
Commit
•
2341d95
1
Parent(s):
f5c4ed1
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ sum_llm_chain = tag_chain.chain(llm=local_llm)
|
|
25 |
pexels_api_key = os.getenv('pexels_api_key')
|
26 |
|
27 |
def pred(query):
|
28 |
-
folder_name, sentences = pexels.generate_videos(query, pexel_api_key,
|
29 |
utils.combine_videos(folder_name)
|
30 |
return {
|
31 |
'video':folder_name,
|
@@ -33,11 +33,14 @@ def pred(query):
|
|
33 |
}
|
34 |
|
35 |
with gr.Blocks() as demo:
|
36 |
-
|
|
|
|
|
|
|
37 |
captions = gr.Textbox()
|
38 |
video = gr.Video()
|
39 |
btn = gr.Button("Submit")
|
40 |
-
btn.click(pred, inputs=
|
41 |
|
42 |
|
43 |
|
|
|
25 |
pexels_api_key = os.getenv('pexels_api_key')
|
26 |
|
27 |
def pred(query):
|
28 |
+
folder_name, sentences = pexels.generate_videos(query, pexel_api_key, dimension, llm_chain, sum_llm_chain)
|
29 |
utils.combine_videos(folder_name)
|
30 |
return {
|
31 |
'video':folder_name,
|
|
|
33 |
}
|
34 |
|
35 |
with gr.Blocks() as demo:
|
36 |
+
dimension = gr.Dropdown(
|
37 |
+
["Potrait", "Landscape", "Square"], label="Video Dimension", info="Choose dimension"
|
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])
|
44 |
|
45 |
|
46 |
|