import gradio as gr import os import sys from pathlib import Path models = [ "johnslegers/epic-diffusion-v1.1", "andite/anything-v4.0", "runwayml/stable-diffusion-v1-5", "claudfuen/photorealistic-fuen-v1", "naclbit/trinart_stable_diffusion_v2", "nitrosocke/Arcane-Diffusion", "nitrosocke/archer-diffusion", "nitrosocke/elden-ring-diffusion", "nitrosocke/redshift-diffusion", "nitrosocke/spider-verse-diffusion", "nitrosocke/mo-di-diffusion", "nitrosocke/classic-anim-diffusion", "dreamlike-art/dreamlike-diffusion-1.0", "dreamlike-art/dreamlike-photoreal-2.0", "wavymulder/wavyfusion", "wavymulder/Analog-Diffusion", "prompthero/midjourney-v4-diffusion", "prompthero/openjourney", "dallinmackay/Van-Gogh-diffusion", "hakurei/waifu-diffusion", "DGSpitzer/Cyberpunk-Anime-Diffusion", "Fictiverse/Stable_Diffusion_BalloonArt_Model", "dallinmackay/Tron-Legacy-diffusion", "AstraliteHeart/pony-diffusion", "nousr/robo-diffusion", "CompVis/stable-diffusion-v1-4", ] current_model = models[0] text_gen1=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link") text_gen2=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link") text_gen3=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link") text_gen4=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link") text_gen5=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link") text_gen6=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link") text_gen7=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link") text_gen8=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link") models2=[ 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), gr.Interface.load(f"models/{models[3]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[4]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[5]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[6]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[7]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[8]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[9]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[10]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[11]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[12]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[13]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[14]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[15]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[16]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[17]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[18]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[19]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[20]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[21]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[22]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[23]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[24]}",live=True,preprocess=True), gr.Interface.load(f"models/{models[25]}",live=True,preprocess=True), ] def text_it1(inputs,text_gen1=text_gen1): go_t1=text_gen1(inputs) return(go_t1) def text_it2(inputs,text_gen2=text_gen2): go_t2=text_gen2(inputs) return(go_t2) def text_it3(inputs,text_gen3=text_gen3): go_t3=text_gen3(inputs) return(go_t3) def text_it4(inputs,text_gen4=text_gen4): go_t4=text_gen4(inputs) return(go_t4) def text_it5(inputs,text_gen5=text_gen5): go_t5=text_gen5(inputs) return(go_t5) def text_it6(inputs,text_gen6=text_gen6): go_t6=text_gen6(inputs) return(go_t6) def text_it7(inputs,text_gen7=text_gen7): go_t7=text_gen7(inputs) return(go_t7) def text_it8(inputs,text_gen8=text_gen8): go_t8=text_gen8(inputs) return(go_t8) def set_model(current_model): current_model = models[current_model] return gr.update(label=(f"{current_model}")),gr.update(label=(f"{current_model}")),gr.update(label=(f"{current_model}")),gr.update(label=(f"{current_model}")),gr.update(label=(f"{current_model}")),gr.update(label=(f"{current_model}")),gr.update(label=(f"{current_model}")),gr.update(label=(f"{current_model}")), def send_it1(inputs, model_choice): proc1=models2[model_choice] output1=proc1(inputs) return(output1) def send_it2(inputs, model_choice): proc2=models2[model_choice] output2=proc2(inputs) return(output2) def send_it3(inputs, model_choice): proc3=models2[model_choice] output3=proc3(inputs) return(output3) def send_it4(inputs, model_choice): proc4=models2[model_choice] output4=proc4(inputs) return(output4) def send_it5(inputs, model_choice): proc5=models2[model_choice] output5=proc5(inputs) return(output5) def send_it6(inputs, model_choice): proc6=models2[model_choice] output6=proc6(inputs) return(output6) def send_it7(inputs, model_choice): proc7=models2[model_choice] output7=proc7(inputs) return(output7) def send_it8(inputs, model_choice): proc8=models2[model_choice] output8=proc8(inputs) return(output8) css="""""" with gr.Blocks(css=css) as myface: gr.HTML("""
""") with gr.Row(): with gr.Tab("Title"): gr.HTML("""