This page uses pure JavaScript `fetch` to send a request to your OmniGen2 Gradio API. Remember to configure CORS on your Gradio server!
Generating image... This may take a moment.
Your generated image will appear here.
Important:
Update `API_ENDPOINT` below to your Gradio server's address (e.g., `http://192.168.1.111:6969/run/predict`).
CORS Fix (Server-Side): You MUST configure your Gradio server to allow requests from this webpage's origin. See the explanation below the code for details.
Run a Local Server: It's highly recommended to serve this HTML file using a local HTTP server (e.g., `python -m http.server`) instead of opening it directly from `file:///` to simplify CORS configuration.