import gradio as gr import replicate # Set the replicate API token import os os.environ["REPLICATE_API_TOKEN"] = "r8_JSR8xlRoCk6cmq3qEOOThVTn3dAgdPq1bWXdj" def generate_output(prompt): output = replicate.run( "fofr/sdxl-turbo:6244ebc4d96ffcc48fa1270d22a1f014addf79c41732fe205fb1ff638c409267", input={"prompt": prompt} ) return output iface = gr.Interface( fn=generate_output, inputs=gr.inputs.Textbox(label="Input Prompt"), outputs=gr.outputs.Textbox(label="Model Output") ) iface.launch(share=True)