Skip to content

Commit 7b180d6

Browse files
committed
fix code
1 parent ad46680 commit 7b180d6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

articles/ai-services/openai/includes/dall-e-python.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ Create a new Python file called quickstart.py. Then open it in your preferred ed
9393
image_file.write(generated_image)
9494

9595
# Display the image in the default image viewer
96-
display(Image.open(image_path))
96+
image = Image.open(image_path)
97+
image.show()
9798
```
9899

99100
> [!IMPORTANT]

articles/ai-services/openai/includes/dall-e-rest.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ Create a new Python file called **quickstart.py**. Then open it up in your prefe
6767
response = requests.get(operation_location, headers=headers)
6868
status = response.json()['status']
6969
image_url = response.json()['result']['data'][0]['url']
70+
71+
print(image_url)
7072
```
7173

7274
> [!IMPORTANT]

0 commit comments

Comments
 (0)