import gradio as gr models=[ "runwayml/stable-diffusion-v1-5", "claudfuen/photorealistic-fuen-v1", "nitrosocke/redshift-diffusion", ] model_box=[ gr.Interface.load(f"models/{models[0]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[1]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[2]}",live=True,preprocess=True), ] current_model=model_box[0] def the_process(input_text, model_choice): a_variable = model_box[model_choice] output = a_variable(input_text) return(output) with gr.Blocks() as demo: gr.HTML("""