Spaces:
Running
Running
fix bufg
Browse files- SlidesLib/image_gen.py +2 -2
SlidesLib/image_gen.py
CHANGED
@@ -8,9 +8,9 @@ class Dalle3():
|
|
8 |
return client
|
9 |
|
10 |
@classmethod
|
11 |
-
def generate_image(cls, query: str, save_path: str = "downloaded_image.png"):
|
12 |
"""Generate an image based on a text query, save the image to the save_path"""
|
13 |
-
client = cls.__init_dalle__()
|
14 |
response = client.images.generate(
|
15 |
model="dall-e-3",
|
16 |
prompt=query,
|
|
|
8 |
return client
|
9 |
|
10 |
@classmethod
|
11 |
+
def generate_image(cls, key: str, query: str, save_path: str = "downloaded_image.png"):
|
12 |
"""Generate an image based on a text query, save the image to the save_path"""
|
13 |
+
client = cls.__init_dalle__(key)
|
14 |
response = client.images.generate(
|
15 |
model="dall-e-3",
|
16 |
prompt=query,
|