Skip to content

Commit

Permalink
Merge pull request #1463 from hlohaus/upp
Browse files Browse the repository at this point in the history
Fix merge issues
  • Loading branch information
hlohaus authored Jan 13, 2024
2 parents 88bfe2c + 7968ae5 commit 693b152
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 1 addition & 4 deletions g4f/Provider/bing/upload_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@
import string
import random
import json
import io
import base64
import math
from PIL import Image
from ...typing import ImageType
from aiohttp import ClientSession
from ...image import to_image, process_image, to_base64

image_config = {
"maxImagePixels": 360000,
"imageComp.ssionRate": 0.7,
"imageCompressionRate": 0.7,
"enableFaceBlurDebug": 0,
}

Expand Down
3 changes: 2 additions & 1 deletion g4f/gui/server/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ def try_response():
'provider': get_last_provider(True)
}) + "\n"
if isinstance(chunk, Exception):
yield json.dumps({
logging.exception(chunk)
yield json.dumps({
'type' : 'message',
'message': get_error_message(chunk),
}) + "\n"
Expand Down

0 comments on commit 693b152

Please sign in to comment.