Spaces:
Running
on
Zero
Running
on
Zero
add num_inference_steps to generate_image, generate_presentation functions
Browse files- src/constructor.py +5 -2
src/constructor.py
CHANGED
@@ -26,6 +26,7 @@ def generate_presentation(
|
|
26 |
slides_num: int,
|
27 |
font:Font,
|
28 |
output_dir: str,
|
|
|
29 |
) -> Presentation:
|
30 |
"""
|
31 |
Generate a PowerPoint presentation based on a description using language and image models.
|
@@ -86,7 +87,8 @@ def generate_presentation(
|
|
86 |
picture = generate_image(
|
87 |
prompt=caption_prompt,
|
88 |
width=image_width,
|
89 |
-
height=image_height
|
|
|
90 |
)
|
91 |
picture_path = os.path.join(
|
92 |
output_dir,
|
@@ -110,7 +112,8 @@ def generate_presentation(
|
|
110 |
background = generate_image(
|
111 |
prompt=background_prompt,
|
112 |
width=background_width,
|
113 |
-
height=background_height
|
|
|
114 |
)
|
115 |
background_path = os.path.join(
|
116 |
output_dir,
|
|
|
26 |
slides_num: int,
|
27 |
font:Font,
|
28 |
output_dir: str,
|
29 |
+
num_inference_steps: int,
|
30 |
) -> Presentation:
|
31 |
"""
|
32 |
Generate a PowerPoint presentation based on a description using language and image models.
|
|
|
87 |
picture = generate_image(
|
88 |
prompt=caption_prompt,
|
89 |
width=image_width,
|
90 |
+
height=image_height,
|
91 |
+
num_inference_steps=num_inference_steps
|
92 |
)
|
93 |
picture_path = os.path.join(
|
94 |
output_dir,
|
|
|
112 |
background = generate_image(
|
113 |
prompt=background_prompt,
|
114 |
width=background_width,
|
115 |
+
height=background_height,
|
116 |
+
num_inference_steps=num_inference_steps
|
117 |
)
|
118 |
background_path = os.path.join(
|
119 |
output_dir,
|