Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -595,8 +595,9 @@ def bing_dalle(item: BingDalle, api_key: None = Depends(validate_api_key)):
|
|
595 |
return SuccessResponse(status="False", randydev={"data": f"Error: {e}"})
|
596 |
|
597 |
def get_image_urls(query):
|
598 |
-
|
599 |
-
|
|
|
600 |
|
601 |
@app.post("/ryuzaki/dalle3xl")
|
602 |
def dalle_3xl(
|
|
|
595 |
return SuccessResponse(status="False", randydev={"data": f"Error: {e}"})
|
596 |
|
597 |
def get_image_urls(query):
|
598 |
+
headers = {"accept":"application/json", "Content-Type": "application/json"}
|
599 |
+
response = requests.get("https://ufoptg-ufop-api.hf.space/dall-e-3/prompt=" + query, headers=headers).json()
|
600 |
+
return [response[f"S{i}-Image"] for i in range(1, 5)]
|
601 |
|
602 |
@app.post("/ryuzaki/dalle3xl")
|
603 |
def dalle_3xl(
|