mirror of
https://github.com/Paillat-dev/viralfactory.git
synced 2026-01-02 01:06:19 +00:00
🎨 Run linter
This commit is contained in:
@@ -39,7 +39,10 @@ class ScriptedVideoPipeline(BasePipeline):
|
|||||||
def get_assets_concurrent(self, assets: list[dict[str, str]]) -> list[mp.VideoClip]:
|
def get_assets_concurrent(self, assets: list[dict[str, str]]) -> list[mp.VideoClip]:
|
||||||
results = []
|
results = []
|
||||||
with ThreadPoolExecutor() as executor:
|
with ThreadPoolExecutor() as executor:
|
||||||
futures = [executor.submit(self.get_asset, asset, i) for i, asset in enumerate(assets)]
|
futures = [
|
||||||
|
executor.submit(self.get_asset, asset, i)
|
||||||
|
for i, asset in enumerate(assets)
|
||||||
|
]
|
||||||
for future in as_completed(futures):
|
for future in as_completed(futures):
|
||||||
try:
|
try:
|
||||||
results.append(future.result())
|
results.append(future.result())
|
||||||
|
|||||||
@@ -42,7 +42,9 @@ class GoogleStockImageEngine(BaseStockImageEngine):
|
|||||||
custom_image_name="temp",
|
custom_image_name="temp",
|
||||||
)
|
)
|
||||||
# we find the file called temp. extension
|
# we find the file called temp. extension
|
||||||
filename = [f for f in os.listdir(f"./temp{i}/") if f.startswith("temp.")][0]
|
filename = [f for f in os.listdir(f"./temp{i}/") if f.startswith("temp.")][
|
||||||
|
0
|
||||||
|
]
|
||||||
img = mp.ImageClip(f"./temp{i}/{filename}")
|
img = mp.ImageClip(f"./temp{i}/{filename}")
|
||||||
# delete the temp folder
|
# delete the temp folder
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user