Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix#544 #545

Merged
merged 3 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,7 @@ cython_debug/

node_modules/

.DS_Store
.DS_Store

# downloaded stuff for 08-building-search-applications
08-building-search-applications/scripts/transcripts_the_ai_show/
4 changes: 2 additions & 2 deletions 09-building-image-applications/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ So what does it take to build an image generation application? You need the foll
image.show()

# catch exceptions
except openai.error.InvalidRequestError as err:
except openai.InvalidRequestError as err:
print(err)

```
Expand Down Expand Up @@ -454,7 +454,7 @@ try:
image.show()

# catch exceptions
except openai.error.InvalidRequestError as err:
except openai.InvalidRequestError as err:
print(err)
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# Display the image in the default image viewer
image = Image.open(image_path)
image.show()
#except openai.error.InvalidRequestError as err:
#except openai.InvalidRequestError as err:
# print(err)

finally:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
" image.show()\n",
" \n",
" # catch exceptions\n",
" except openai.error.InvalidRequestError as err:\n",
" except openai.InvalidRequestError as err:\n",
" print(err)\n",
"\n",
" ```\n",
Expand Down
2 changes: 1 addition & 1 deletion 09-building-image-applications/python/oai-app-variation.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
# Display the image in the default image viewer
image = Image.open(image_path)
image.show()
except openai.error.InvalidRequestError as err:
except openai.InvalidRequestError as err:
print(err)
3 changes: 1 addition & 2 deletions 09-building-image-applications/python/oai-app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

# import dotenv
dotenv.load_dotenv()


client = OpenAI()

Expand Down Expand Up @@ -42,7 +41,7 @@
image.show()

# catch exceptions
except client.error.InvalidRequestError as err:
except openai.InvalidRequestError as err:
print(err)

# ---creating variation below---
Expand Down
4 changes: 2 additions & 2 deletions 09-building-image-applications/translations/cn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ _图片来源维基百科,图片由 Midjourney 生成_
image.show()

# catch exceptions
except openai.error.InvalidRequestError as err:
except openai.InvalidRequestError as err:
print(err)

```
Expand Down Expand Up @@ -458,7 +458,7 @@ try:
image.show()

# catch exceptions
except openai.error.InvalidRequestError as err:
except openai.InvalidRequestError as err:
print(err)
```

Expand Down
4 changes: 2 additions & 2 deletions 09-building-image-applications/translations/ja-jp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ _Image cred Wikipedia, image generated by Midjourney_
image.show()

# 例外をキャッチ
except openai.error.InvalidRequestError as err:
except openai.InvalidRequestError as err:
print(err)

```
Expand Down Expand Up @@ -454,7 +454,7 @@ try:
image.show()

# 例外をキャッチ
except openai.error.InvalidRequestError as err:
except openai.InvalidRequestError as err:
print(err)
```

Expand Down
4 changes: 2 additions & 2 deletions 09-building-image-applications/translations/ko/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ _자기회귀 트랜스포머 (autoregressive transformer)_ 는 모델이 텍스
image.show()

# 예외 처리
except openai.error.InvalidRequestError as err:
except openai.InvalidRequestError as err:
print(err)

```
Expand Down Expand Up @@ -446,7 +446,7 @@ try:
image.show()

# 예외 처리
except openai.error.InvalidRequestError as err:
except openai.InvalidRequestError as err:
print(err)
```

Expand Down
4 changes: 2 additions & 2 deletions 09-building-image-applications/translations/pt-br/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Então, o que é necessário para construir um aplicativo de geração de imagen
image.show()

# catch exceptions
except openai.error.InvalidRequestError as err:
except openai.InvalidRequestError as err:
print(err)

```
Expand Down Expand Up @@ -493,7 +493,7 @@ try:
image.show()

# catch exceptions
except openai.error.InvalidRequestError as err:
except openai.InvalidRequestError as err:
print(err)
```

Expand Down
4 changes: 2 additions & 2 deletions 09-building-image-applications/translations/tw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ _圖片來源 Wikipedia, 圖片由 Midjourney 生成_
image.show()

# 捕捉異常
except openai.error.InvalidRequestError as err:
except openai.InvalidRequestError as err:
print(err)

```
Expand Down Expand Up @@ -454,7 +454,7 @@ try:
image.show()

# 捕捉異常
except openai.error.InvalidRequestError as err:
except openai.InvalidRequestError as err:
print(err)
```

Expand Down
Loading