Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| import os | |
| from huggingface_hub import InferenceClient | |
| client = InferenceClient( | |
| provider="fal-ai", | |
| api_key=os.environ["HF_TOKEN"] | |
| ) | |
| image = client.text_to_image( | |
| "Astronaut riding a horse", | |
| model="black-forest-labs/FLUX.1-dev" | |
| ) | |
| with gr.Blocks() as demo: | |
| gr.Image(image) | |
| demo.launch() |