mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-11-22 15:05:57 +03:00
Update DeepInfraImage.py
This commit is contained in:
parent
4271fb9870
commit
deb3898e7a
@ -70,5 +70,7 @@ class DeepInfraImage(AsyncGeneratorProvider, ProviderModelMixin):
|
||||
await raise_for_status(response)
|
||||
data = await response.json()
|
||||
images = data["output"] if "output" in data else data["images"]
|
||||
if not images:
|
||||
raise RuntimeError(f"Response: {data}")
|
||||
images = images[0] if len(images) == 1 else images
|
||||
return ImageResponse(images, prompt)
|
Loading…
Reference in New Issue
Block a user