Spaces:
Paused
Paused
File size: 476 Bytes
bf53440 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | from __future__ import annotations
from services.protocol import openai_v1_image_generations
from test.utils import save_image
def main() -> None:
prompt = "一只橘猫坐在窗台上,午后阳光,写实摄影"
data = openai_v1_image_generations.handle({"prompt": prompt, "model": "gpt-5-3", "n": 1})
for index, item in enumerate(data["data"], start=1):
print(save_image(item["b64_json"], f"image_{index}"))
if __name__ == "__main__":
main()
|