Spaces:
Runtime error
Runtime error
Dy
commited on
Commit
•
18bc539
1
Parent(s):
8d9afc4
Update app.py
Browse files
app.py
CHANGED
@@ -182,7 +182,7 @@ def prompt_to_video(video_prompt):
|
|
182 |
os.makedirs(extract_path, exist_ok=True)
|
183 |
|
184 |
# Configuration for imgkit
|
185 |
-
|
186 |
|
187 |
# The path to store the images
|
188 |
image_path = os.path.join(extract_path, 'images')
|
@@ -206,7 +206,7 @@ def prompt_to_video(video_prompt):
|
|
206 |
full_image_path = os.path.join(image_path, image_file)
|
207 |
|
208 |
# Convert the HTML to an image
|
209 |
-
imgkit.from_file(full_path, full_image_path)
|
210 |
|
211 |
# Store the image file name
|
212 |
file_images[html_file] = image_file
|
|
|
182 |
os.makedirs(extract_path, exist_ok=True)
|
183 |
|
184 |
# Configuration for imgkit
|
185 |
+
config = imgkit.config(wkhtmltoimage='/usr/local/bin/wkhtmltoimage')
|
186 |
|
187 |
# The path to store the images
|
188 |
image_path = os.path.join(extract_path, 'images')
|
|
|
206 |
full_image_path = os.path.join(image_path, image_file)
|
207 |
|
208 |
# Convert the HTML to an image
|
209 |
+
imgkit.from_file(full_path, full_image_path, configuration=config)
|
210 |
|
211 |
# Store the image file name
|
212 |
file_images[html_file] = image_file
|