jonathanjordan21
commited on
Commit
·
a9b60a6
1
Parent(s):
2341d95
Update components/pexels.py
Browse files- components/pexels.py +2 -2
components/pexels.py
CHANGED
@@ -47,7 +47,7 @@ def download_video(data, parent_path, height, width, i):
|
|
47 |
|
48 |
|
49 |
# Utilizing the LLMs to find the relevant videos
|
50 |
-
def generate_videos(product, api_key,
|
51 |
prod = product.replace(" ", "_")
|
52 |
|
53 |
try :
|
@@ -70,7 +70,7 @@ def generate_videos(product, api_key, height=None, width=None, llm_chain=None, s
|
|
70 |
for i,s in enumerate(sentences):
|
71 |
keyword = sum_llm_chain.run(s)
|
72 |
print(i+1, ":", keyword)
|
73 |
-
data = search_pexels(keyword, api_key, )
|
74 |
download_video(data, prod, height, width, i)
|
75 |
|
76 |
print("Success! videos has been generated")
|
|
|
47 |
|
48 |
|
49 |
# Utilizing the LLMs to find the relevant videos
|
50 |
+
def generate_videos(product, api_key, orientation, llm_chain=None, sum_llm_chain=None):
|
51 |
prod = product.replace(" ", "_")
|
52 |
|
53 |
try :
|
|
|
70 |
for i,s in enumerate(sentences):
|
71 |
keyword = sum_llm_chain.run(s)
|
72 |
print(i+1, ":", keyword)
|
73 |
+
data = search_pexels(keyword, api_key, orientation.lower())
|
74 |
download_video(data, prod, height, width, i)
|
75 |
|
76 |
print("Success! videos has been generated")
|