Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	Duplicate from Omnibus/Top-20-Diffusion
Browse filesCo-authored-by: Bot <Omnibus@users.noreply.huggingface.co>
    	
        .gitattributes
    ADDED
    
    | @@ -0,0 +1,34 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            *.7z filter=lfs diff=lfs merge=lfs -text
         | 
| 2 | 
            +
            *.arrow filter=lfs diff=lfs merge=lfs -text
         | 
| 3 | 
            +
            *.bin filter=lfs diff=lfs merge=lfs -text
         | 
| 4 | 
            +
            *.bz2 filter=lfs diff=lfs merge=lfs -text
         | 
| 5 | 
            +
            *.ckpt filter=lfs diff=lfs merge=lfs -text
         | 
| 6 | 
            +
            *.ftz filter=lfs diff=lfs merge=lfs -text
         | 
| 7 | 
            +
            *.gz filter=lfs diff=lfs merge=lfs -text
         | 
| 8 | 
            +
            *.h5 filter=lfs diff=lfs merge=lfs -text
         | 
| 9 | 
            +
            *.joblib filter=lfs diff=lfs merge=lfs -text
         | 
| 10 | 
            +
            *.lfs.* filter=lfs diff=lfs merge=lfs -text
         | 
| 11 | 
            +
            *.mlmodel filter=lfs diff=lfs merge=lfs -text
         | 
| 12 | 
            +
            *.model filter=lfs diff=lfs merge=lfs -text
         | 
| 13 | 
            +
            *.msgpack filter=lfs diff=lfs merge=lfs -text
         | 
| 14 | 
            +
            *.npy filter=lfs diff=lfs merge=lfs -text
         | 
| 15 | 
            +
            *.npz filter=lfs diff=lfs merge=lfs -text
         | 
| 16 | 
            +
            *.onnx filter=lfs diff=lfs merge=lfs -text
         | 
| 17 | 
            +
            *.ot filter=lfs diff=lfs merge=lfs -text
         | 
| 18 | 
            +
            *.parquet filter=lfs diff=lfs merge=lfs -text
         | 
| 19 | 
            +
            *.pb filter=lfs diff=lfs merge=lfs -text
         | 
| 20 | 
            +
            *.pickle filter=lfs diff=lfs merge=lfs -text
         | 
| 21 | 
            +
            *.pkl filter=lfs diff=lfs merge=lfs -text
         | 
| 22 | 
            +
            *.pt filter=lfs diff=lfs merge=lfs -text
         | 
| 23 | 
            +
            *.pth filter=lfs diff=lfs merge=lfs -text
         | 
| 24 | 
            +
            *.rar filter=lfs diff=lfs merge=lfs -text
         | 
| 25 | 
            +
            *.safetensors filter=lfs diff=lfs merge=lfs -text
         | 
| 26 | 
            +
            saved_model/**/* filter=lfs diff=lfs merge=lfs -text
         | 
| 27 | 
            +
            *.tar.* filter=lfs diff=lfs merge=lfs -text
         | 
| 28 | 
            +
            *.tflite filter=lfs diff=lfs merge=lfs -text
         | 
| 29 | 
            +
            *.tgz filter=lfs diff=lfs merge=lfs -text
         | 
| 30 | 
            +
            *.wasm filter=lfs diff=lfs merge=lfs -text
         | 
| 31 | 
            +
            *.xz filter=lfs diff=lfs merge=lfs -text
         | 
| 32 | 
            +
            *.zip filter=lfs diff=lfs merge=lfs -text
         | 
| 33 | 
            +
            *.zst filter=lfs diff=lfs merge=lfs -text
         | 
| 34 | 
            +
            *tfevents* filter=lfs diff=lfs merge=lfs -text
         | 
    	
        README.md
    ADDED
    
    | @@ -0,0 +1,13 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            title: Top 20 Diffusion
         | 
| 3 | 
            +
            emoji: 👑
         | 
| 4 | 
            +
            colorFrom: blue
         | 
| 5 | 
            +
            colorTo: indigo
         | 
| 6 | 
            +
            sdk: gradio
         | 
| 7 | 
            +
            sdk_version: 3.18.0
         | 
| 8 | 
            +
            app_file: app.py
         | 
| 9 | 
            +
            pinned: true
         | 
| 10 | 
            +
            duplicated_from: Omnibus/Top-20-Diffusion
         | 
| 11 | 
            +
            ---
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
         | 
    	
        app.py
    ADDED
    
    | @@ -0,0 +1,338 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            import gradio as gr
         | 
| 2 | 
            +
            import os 
         | 
| 3 | 
            +
            import sys
         | 
| 4 | 
            +
            from pathlib import Path
         | 
| 5 | 
            +
            import time
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            models =[
         | 
| 8 | 
            +
                "",
         | 
| 9 | 
            +
                "CompVis/stable-diffusion-v1-4",
         | 
| 10 | 
            +
                "runwayml/stable-diffusion-v1-5",
         | 
| 11 | 
            +
                "prompthero/openjourney",
         | 
| 12 | 
            +
                "stabilityai/stable-diffusion-2-1",
         | 
| 13 | 
            +
                "stabilityai/stable-diffusion-2-1-base",
         | 
| 14 | 
            +
                "andite/anything-v4.0",
         | 
| 15 | 
            +
                "Linaqruf/anything-v3.0",
         | 
| 16 | 
            +
                "eimiss/EimisAnimeDiffusion_1.0v",
         | 
| 17 | 
            +
                "nitrosocke/Nitro-Diffusion",
         | 
| 18 | 
            +
                "wavymulder/portraitplus",
         | 
| 19 | 
            +
                "22h/vintedois-diffusion-v0-1",
         | 
| 20 | 
            +
                "dreamlike-art/dreamlike-photoreal-2.0",
         | 
| 21 | 
            +
                "dreamlike-art/dreamlike-diffusion-1.0",
         | 
| 22 | 
            +
                "wavymulder/Analog-Diffusion",
         | 
| 23 | 
            +
                "nitrosocke/redshift-diffusion",
         | 
| 24 | 
            +
                "claudfuen/photorealistic-fuen-v1",
         | 
| 25 | 
            +
                "prompthero/openjourney-v2",
         | 
| 26 | 
            +
                "johnslegers/epic-diffusion",
         | 
| 27 | 
            +
                "nitrosocke/Arcane-Diffusion",
         | 
| 28 | 
            +
                "darkstorm2150/Protogen_x5.8_Official_Release",
         | 
| 29 | 
            +
             | 
| 30 | 
            +
            ]
         | 
| 31 | 
            +
             | 
| 32 | 
            +
            model_1=models[1]
         | 
| 33 | 
            +
            model_2=models[2]
         | 
| 34 | 
            +
            model_3=models[3]
         | 
| 35 | 
            +
            model_4=models[4]
         | 
| 36 | 
            +
            model_5=models[5]
         | 
| 37 | 
            +
            model_6=models[6]
         | 
| 38 | 
            +
            model_7=models[7]
         | 
| 39 | 
            +
            model_8=models[8]
         | 
| 40 | 
            +
            model_9=models[9]
         | 
| 41 | 
            +
            model_10=models[10]
         | 
| 42 | 
            +
            model_11=models[11]
         | 
| 43 | 
            +
            model_12=models[12]
         | 
| 44 | 
            +
            model_13=models[13]
         | 
| 45 | 
            +
            model_14=models[14]
         | 
| 46 | 
            +
            model_15=models[15]
         | 
| 47 | 
            +
            model_16=models[16]
         | 
| 48 | 
            +
            model_17=models[17]
         | 
| 49 | 
            +
            model_18=models[18]
         | 
| 50 | 
            +
            model_19=models[19]
         | 
| 51 | 
            +
            model_20=models[20]
         | 
| 52 | 
            +
             | 
| 53 | 
            +
            text_gen=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link",live=True, preprocess=True)
         | 
| 54 | 
            +
             | 
| 55 | 
            +
            proc1=gr.Interface.load(f"models/{model_1}",live=False,preprocess=True, postprocess=False)
         | 
| 56 | 
            +
            proc2=gr.Interface.load(f"models/{model_2}",live=False,preprocess=True, postprocess=False)
         | 
| 57 | 
            +
            proc3=gr.Interface.load(f"models/{model_3}",live=False,preprocess=True, postprocess=False)
         | 
| 58 | 
            +
            proc4=gr.Interface.load(f"models/{model_4}",live=False,preprocess=True, postprocess=False)
         | 
| 59 | 
            +
            proc5=gr.Interface.load(f"models/{model_5}",live=False,preprocess=True, postprocess=False)
         | 
| 60 | 
            +
            proc6=gr.Interface.load(f"models/{model_6}",live=False,preprocess=True, postprocess=False)
         | 
| 61 | 
            +
            proc7=gr.Interface.load(f"models/{model_7}",live=False,preprocess=True, postprocess=False)
         | 
| 62 | 
            +
            proc8=gr.Interface.load(f"models/{model_8}",live=False,preprocess=True, postprocess=False)
         | 
| 63 | 
            +
            proc9=gr.Interface.load(f"models/{model_9}",live=False,preprocess=True, postprocess=False)
         | 
| 64 | 
            +
            proc10=gr.Interface.load(f"models/{model_10}",live=False,preprocess=True, postprocess=False)
         | 
| 65 | 
            +
            proc11=gr.Interface.load(f"models/{model_11}",live=False,preprocess=True, postprocess=False)
         | 
| 66 | 
            +
            proc12=gr.Interface.load(f"models/{model_12}",live=False,preprocess=True, postprocess=False)
         | 
| 67 | 
            +
            proc13=gr.Interface.load(f"models/{model_13}",live=False,preprocess=True, postprocess=False)
         | 
| 68 | 
            +
            proc14=gr.Interface.load(f"models/{model_14}",live=False,preprocess=True, postprocess=False)
         | 
| 69 | 
            +
            proc15=gr.Interface.load(f"models/{model_15}",live=False,preprocess=True, postprocess=False)
         | 
| 70 | 
            +
            proc16=gr.Interface.load(f"models/{model_16}",live=False,preprocess=True, postprocess=False)
         | 
| 71 | 
            +
            proc17=gr.Interface.load(f"models/{model_17}",live=False,preprocess=True, postprocess=False)
         | 
| 72 | 
            +
            proc18=gr.Interface.load(f"models/{model_18}",live=False,preprocess=True, postprocess=False)
         | 
| 73 | 
            +
            proc19=gr.Interface.load(f"models/{model_19}",live=False,preprocess=True, postprocess=False)
         | 
| 74 | 
            +
            proc20=gr.Interface.load(f"models/{model_20}",live=False,preprocess=True, postprocess=False)
         | 
| 75 | 
            +
             | 
| 76 | 
            +
            def get_prompts(prompt_text):
         | 
| 77 | 
            +
                return text_gen(prompt_text)
         | 
| 78 | 
            +
            def send_it1(inputs,proc1=proc1):
         | 
| 79 | 
            +
                    output1=proc1(inputs)
         | 
| 80 | 
            +
                    return(output1)
         | 
| 81 | 
            +
            def send_it2(inputs,proc2=proc2):
         | 
| 82 | 
            +
                    output2=proc2(inputs)
         | 
| 83 | 
            +
                    return(output2)
         | 
| 84 | 
            +
            def send_it3(inputs,proc3=proc3):
         | 
| 85 | 
            +
                    output3=proc3(inputs)
         | 
| 86 | 
            +
                    return(output3)
         | 
| 87 | 
            +
            def send_it4(inputs,proc4=proc4):
         | 
| 88 | 
            +
                    output4=proc4(inputs)
         | 
| 89 | 
            +
                    return(output4)
         | 
| 90 | 
            +
            def send_it5(inputs,proc5=proc5):
         | 
| 91 | 
            +
                    output5=proc5(inputs)
         | 
| 92 | 
            +
                    return(output5)
         | 
| 93 | 
            +
            def send_it6(inputs,proc6=proc6):
         | 
| 94 | 
            +
                    output6=proc6(inputs)
         | 
| 95 | 
            +
                    return(output6)
         | 
| 96 | 
            +
            def send_it7(inputs,proc7=proc7):
         | 
| 97 | 
            +
                    output7=proc7(inputs)
         | 
| 98 | 
            +
                    return(output7)
         | 
| 99 | 
            +
            def send_it8(inputs,proc8=proc8):
         | 
| 100 | 
            +
                    output8=proc8(inputs)
         | 
| 101 | 
            +
                    return(output8)
         | 
| 102 | 
            +
            def send_it9(inputs,proc9=proc9):
         | 
| 103 | 
            +
                    output9=proc9(inputs)
         | 
| 104 | 
            +
                    return(output9)
         | 
| 105 | 
            +
            def send_it10(inputs,proc10=proc10):
         | 
| 106 | 
            +
                    output10=proc10(inputs)
         | 
| 107 | 
            +
                    return(output10)
         | 
| 108 | 
            +
            def send_it11(inputs,proc11=proc11):
         | 
| 109 | 
            +
                    output11=proc11(inputs)
         | 
| 110 | 
            +
                    return(output11)
         | 
| 111 | 
            +
            def send_it12(inputs,proc12=proc12):
         | 
| 112 | 
            +
                    output12=proc12(inputs)
         | 
| 113 | 
            +
                    return(output12)
         | 
| 114 | 
            +
            def send_it13(inputs,proc13=proc13):
         | 
| 115 | 
            +
                    output13=proc13(inputs)
         | 
| 116 | 
            +
                    return(output13)
         | 
| 117 | 
            +
            def send_it14(inputs,proc14=proc14):
         | 
| 118 | 
            +
                    output14=proc14(inputs)
         | 
| 119 | 
            +
                    return(output14)
         | 
| 120 | 
            +
            def send_it15(inputs,proc15=proc15):
         | 
| 121 | 
            +
                    output15=proc15(inputs)
         | 
| 122 | 
            +
                    return(output15)
         | 
| 123 | 
            +
            def send_it16(inputs,proc16=proc16):
         | 
| 124 | 
            +
                    output16=proc16(inputs)
         | 
| 125 | 
            +
                    return(output16)
         | 
| 126 | 
            +
            def send_it17(inputs,proc17=proc17):
         | 
| 127 | 
            +
                    output17=proc17(inputs)
         | 
| 128 | 
            +
                    return(output17)
         | 
| 129 | 
            +
            def send_it18(inputs,proc18=proc18):
         | 
| 130 | 
            +
                    output18=proc18(inputs)
         | 
| 131 | 
            +
                    return(output18)
         | 
| 132 | 
            +
            def send_it19(inputs,proc19=proc19):
         | 
| 133 | 
            +
                    output19=proc19(inputs)
         | 
| 134 | 
            +
                    return(output19)
         | 
| 135 | 
            +
            def send_it20(inputs,proc20=proc20):
         | 
| 136 | 
            +
                    output20=proc20(inputs)
         | 
| 137 | 
            +
                    return(output20)
         | 
| 138 | 
            +
             | 
| 139 | 
            +
             | 
| 140 | 
            +
             | 
| 141 | 
            +
            with gr.Blocks(css="cake.css") as myface:
         | 
| 142 | 
            +
                gr.HTML("""<head><meta http-equiv="refresh" content="600"></head>""")
         | 
| 143 | 
            +
                with gr.Column():
         | 
| 144 | 
            +
                    gr.HTML("""<title>Top 20 Diffuion</title>""")
         | 
| 145 | 
            +
                    gr.Markdown("""<center><h1>Top 20 Diffusion</h1><center>""")
         | 
| 146 | 
            +
                    gr.Markdown("""<center><h4>20 Popular Diffusion Models</h4><center>""")
         | 
| 147 | 
            +
                    gr.Markdown("""<center><h4>Comparison Space</h4><center>""")
         | 
| 148 | 
            +
                with gr.Accordion("Details",open=False):
         | 
| 149 | 
            +
                    with gr.Tab("Description"):
         | 
| 150 | 
            +
                        gr.Markdown("""<center>
         | 
| 151 | 
            +
                        <h4>Enter your Prompt into the "Short Prompt" box and click "Magic Prompt" to load a prettified version of your prompt<br>
         | 
| 152 | 
            +
                        When you are satisfied with the prompt that is in the "Text to Image" box, click "Launch" to load the Models.<br><br>
         | 
| 153 | 
            +
                        Images load faster with a simpler prompt.<br>  
         | 
| 154 | 
            +
                        <br>
         | 
| 155 | 
            +
                        Images will cancel loading after 1 minute to preserve the quality of the queue.<br>
         | 
| 156 | 
            +
                        Simply Click "Launch" again to try loading the incomplete images.<br>
         | 
| 157 | 
            +
                        Page refreshes every 10 minutes.
         | 
| 158 | 
            +
                        <br>
         | 
| 159 | 
            +
                        <br>
         | 
| 160 | 
            +
                        Not responsible for content, use at your own risk.
         | 
| 161 | 
            +
                        </h4></center>""")
         | 
| 162 | 
            +
                    with gr.Tab("DIY"):
         | 
| 163 | 
            +
                        gr.HTML("""<div style="text-align:Left;">
         | 
| 164 | 
            +
                        <h4>Easy Clone:<br><br>
         | 
| 165 | 
            +
                        Copy/Paste this code in your new app.py file<br><br>
         | 
| 166 | 
            +
                        import gradio as gr<br>
         | 
| 167 | 
            +
                        max_d=gr.Interface.load("spaces/Omnibus/Top-20-Diffusion")<br>
         | 
| 168 | 
            +
                        max_d.launch()<br>                    
         | 
| 169 | 
            +
                        </h4></div>""")                    
         | 
| 170 | 
            +
                    with gr.Tab("Credits"):
         | 
| 171 | 
            +
                        with gr.Row():
         | 
| 172 | 
            +
                            with gr.Column(style="text-align:left;"):
         | 
| 173 | 
            +
                                gr.HTML("""
         | 
| 174 | 
            +
                                        <div style="vertical-align:center">
         | 
| 175 | 
            +
                                          <br>
         | 
| 176 | 
            +
                                          <p>Magic Prompt:
         | 
| 177 | 
            +
                                          <p><a href="https://huggingface.co/spaces/Gustavosta/MagicPrompt-Stable-Diffusion">Magic Prompt Stable Diffusion</a></p>
         | 
| 178 | 
            +
                                          <p><a href="https://huggingface.co/spaces/huggingface-projects/magic-diffusion">Magic Diffusion</a></p>
         | 
| 179 | 
            +
                                        </div>
         | 
| 180 | 
            +
                                        """)
         | 
| 181 | 
            +
                            with gr.Column(style="text-align:left;"):
         | 
| 182 | 
            +
                                gr.HTML(f"""
         | 
| 183 | 
            +
                                        <div style="vertical-align:center">
         | 
| 184 | 
            +
                                          <br>
         | 
| 185 | 
            +
                                          <p>Models by:<br>
         | 
| 186 | 
            +
                                          <a href="https://huggingface.co/{models[1]}">{models[1]}</a><br>
         | 
| 187 | 
            +
                                          <a href="https://huggingface.co/{models[2]}">{models[2]}</a><br>
         | 
| 188 | 
            +
                                          <a href="https://huggingface.co/{models[3]}">{models[3]}</a><br>
         | 
| 189 | 
            +
                                          <a href="https://huggingface.co/{models[4]}">{models[4]}</a><br>
         | 
| 190 | 
            +
                                          <a href="https://huggingface.co/{models[5]}">{models[5]}</a><br>
         | 
| 191 | 
            +
                                          <a href="https://huggingface.co/{models[6]}">{models[6]}</a><br>
         | 
| 192 | 
            +
                                          <a href="https://huggingface.co/{models[7]}">{models[7]}</a><br>
         | 
| 193 | 
            +
                                          <a href="https://huggingface.co/{models[8]}">{models[8]}</a><br>
         | 
| 194 | 
            +
                                          <a href="https://huggingface.co/{models[9]}">{models[9]}</a><br>
         | 
| 195 | 
            +
                                          <a href="https://huggingface.co/{models[10]}">{models[10]}</a><br>
         | 
| 196 | 
            +
                                          <a href="https://huggingface.co/{models[11]}">{models[11]}</a><br>
         | 
| 197 | 
            +
                                          <a href="https://huggingface.co/{models[12]}">{models[12]}</a><br>
         | 
| 198 | 
            +
                                          <a href="https://huggingface.co/{models[13]}">{models[13]}</a><br>
         | 
| 199 | 
            +
                                          <a href="https://huggingface.co/{models[14]}">{models[14]}</a><br>
         | 
| 200 | 
            +
                                          <a href="https://huggingface.co/{models[15]}">{models[15]}</a><br>
         | 
| 201 | 
            +
                                          <a href="https://huggingface.co/{models[16]}">{models[16]}</a><br>
         | 
| 202 | 
            +
                                          <a href="https://huggingface.co/{models[17]}">{models[17]}</a><br>
         | 
| 203 | 
            +
                                          <a href="https://huggingface.co/{models[18]}">{models[18]}</a><br>
         | 
| 204 | 
            +
                                          <a href="https://huggingface.co/{models[19]}">{models[19]}</a><br>
         | 
| 205 | 
            +
                                          <a href="https://huggingface.co/{models[20]}">{models[20]}</a><br>
         | 
| 206 | 
            +
                                          </p>
         | 
| 207 | 
            +
                                        </div>
         | 
| 208 | 
            +
                                        """)                    
         | 
| 209 | 
            +
                    with gr.Tab("Tools"):
         | 
| 210 | 
            +
                                with gr.Tab("Draw"):
         | 
| 211 | 
            +
                                    with gr.Row():
         | 
| 212 | 
            +
                                        with gr.Column(style="width=50%"):
         | 
| 213 | 
            +
                                                gr.Pil(label="Crop")
         | 
| 214 | 
            +
                                        with gr.Column(style="width=50%"):
         | 
| 215 | 
            +
                                                gr.Pil(label="Draw")
         | 
| 216 | 
            +
                                with gr.Tab("View"):
         | 
| 217 | 
            +
                                    with gr.Row():  
         | 
| 218 | 
            +
                                        with gr.Column():
         | 
| 219 | 
            +
                                                gr.Pil(label="Crop").style(style="height=500")
         | 
| 220 | 
            +
                                with gr.Tab("Color Picker"):
         | 
| 221 | 
            +
                                    with gr.Row():
         | 
| 222 | 
            +
                                        with gr.Column(scale=50):
         | 
| 223 | 
            +
                                            gr.ColorPicker(label="Color", interactive=True)            
         | 
| 224 | 
            +
                                        with gr.Column(scale=50):
         | 
| 225 | 
            +
                                            gr.ImagePaint(label="Draw", interactive=True)     
         | 
| 226 | 
            +
                                with gr.Tab("Text"):
         | 
| 227 | 
            +
                                    with gr.Row():
         | 
| 228 | 
            +
                                        with gr.Column(scale=50):
         | 
| 229 | 
            +
                                            gr.Textbox(label="", lines=8, interactive=True)            
         | 
| 230 | 
            +
                                        with gr.Column(scale=50):
         | 
| 231 | 
            +
                                            gr.Textbox(label="", lines=8, interactive=True)
         | 
| 232 | 
            +
                                       
         | 
| 233 | 
            +
                with gr.Box(visible=True) as timo:            
         | 
| 234 | 
            +
                    with gr.Row():
         | 
| 235 | 
            +
                        with gr.Column():
         | 
| 236 | 
            +
                            input_text=gr.Textbox(label="Short Prompt")
         | 
| 237 | 
            +
                            prompt=gr.Textbox(label="Text to Image",visible=True)
         | 
| 238 | 
            +
                        with gr.Column():
         | 
| 239 | 
            +
                            see_prompts=gr.Button("Magic Prompt")
         | 
| 240 | 
            +
                            with gr.Row():
         | 
| 241 | 
            +
                                run=gr.Button("Launch")
         | 
| 242 | 
            +
                                clear_btn=gr.Button("Clear")
         | 
| 243 | 
            +
                    with gr.Row():
         | 
| 244 | 
            +
                            output1=gr.Image(label=(f"{model_1}"),visible=True)
         | 
| 245 | 
            +
                            output2=gr.Image(label=(f"{model_2}"),visible=True)
         | 
| 246 | 
            +
                            output3=gr.Image(label=(f"{model_3}"),visible=True)
         | 
| 247 | 
            +
                            output4=gr.Image(label=(f"{model_4}"),visible=True)
         | 
| 248 | 
            +
                    with gr.Row():
         | 
| 249 | 
            +
                            output5=gr.Image(label=(f"{model_5}"),visible=True)
         | 
| 250 | 
            +
                            output6=gr.Image(label=(f"{model_6}"),visible=True)
         | 
| 251 | 
            +
                            output7=gr.Image(label=(f"{model_7}"),visible=True)
         | 
| 252 | 
            +
                            output8=gr.Image(label=(f"{model_8}"),visible=True)
         | 
| 253 | 
            +
                    with gr.Row():
         | 
| 254 | 
            +
                            output9=gr.Image(label=(f"{model_9}"),visible=True)
         | 
| 255 | 
            +
                            output10=gr.Image(label=(f"{model_10}"),visible=True)
         | 
| 256 | 
            +
                            output11=gr.Image(label=(f"{model_11}"),visible=True)
         | 
| 257 | 
            +
                            output12=gr.Image(label=(f"{model_12}"),visible=True)
         | 
| 258 | 
            +
                    with gr.Row():
         | 
| 259 | 
            +
                            output13=gr.Image(label=(f"{model_13}"),visible=True)
         | 
| 260 | 
            +
                            output14=gr.Image(label=(f"{model_14}"),visible=True)
         | 
| 261 | 
            +
                            output15=gr.Image(label=(f"{model_15}"),visible=True)
         | 
| 262 | 
            +
                            output16=gr.Image(label=(f"{model_16}"),visible=True)
         | 
| 263 | 
            +
                    with gr.Row():
         | 
| 264 | 
            +
                            output17=gr.Image(label=(f"{model_17}"),visible=True)
         | 
| 265 | 
            +
                            output18=gr.Image(label=(f"{model_18}"),visible=True)
         | 
| 266 | 
            +
                            output19=gr.Image(label=(f"{model_19}"),visible=True)
         | 
| 267 | 
            +
                            output20=gr.Image(label=(f"{model_20}"),visible=True)
         | 
| 268 | 
            +
                    with gr.Row(visible=False):
         | 
| 269 | 
            +
                            start_box=gr.Number(interactive=False)
         | 
| 270 | 
            +
                            end_box=gr.Number(interactive=False)
         | 
| 271 | 
            +
                            tog_box=gr.Textbox(value=0,interactive=False)
         | 
| 272 | 
            +
             | 
| 273 | 
            +
                    
         | 
| 274 | 
            +
                    def clear_it(val):
         | 
| 275 | 
            +
                        if int(val) != 0:
         | 
| 276 | 
            +
                            val = 0
         | 
| 277 | 
            +
                        else:
         | 
| 278 | 
            +
                            val = 0
         | 
| 279 | 
            +
                            pass
         | 
| 280 | 
            +
                        return val
         | 
| 281 | 
            +
                        
         | 
| 282 | 
            +
                    def sesh_end(cnt,t_stamp):
         | 
| 283 | 
            +
                        to = t_stamp + 60
         | 
| 284 | 
            +
                        et = time.time()
         | 
| 285 | 
            +
                        if et > to and t_stamp != 0:
         | 
| 286 | 
            +
                            d=gr.update(value=0)
         | 
| 287 | 
            +
                            tog=gr.update(value=1)
         | 
| 288 | 
            +
                            #print(f'to: {to}  et: {et}')
         | 
| 289 | 
            +
                        else:
         | 
| 290 | 
            +
                            if cnt != 0:
         | 
| 291 | 
            +
                                d=gr.update(value=et)
         | 
| 292 | 
            +
                            else:
         | 
| 293 | 
            +
                                d=gr.update(value=0)
         | 
| 294 | 
            +
                            tog=gr.update(value=0)
         | 
| 295 | 
            +
                            #print (f'passing:  to: {to}  et: {et}')
         | 
| 296 | 
            +
                            pass
         | 
| 297 | 
            +
                        return d,tog
         | 
| 298 | 
            +
                    
         | 
| 299 | 
            +
                    def sesh_start():
         | 
| 300 | 
            +
                        t = time.gmtime()
         | 
| 301 | 
            +
                        t_stamp = time.time()
         | 
| 302 | 
            +
                        current_time = time.strftime("%H:%M:%S", t)
         | 
| 303 | 
            +
                        return gr.update(value=t_stamp),gr.update(value=t_stamp),gr.update(value=0)
         | 
| 304 | 
            +
                    
         | 
| 305 | 
            +
                    def clear_fn():
         | 
| 306 | 
            +
                        return None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None
         | 
| 307 | 
            +
             | 
| 308 | 
            +
                    start_box.change(sesh_end,[start_box,end_box],[start_box,tog_box],every=1,show_progress=False)
         | 
| 309 | 
            +
                    run.click(sesh_start,None,[start_box,end_box,tog_box])
         | 
| 310 | 
            +
                    run1=run.click(send_it1, inputs=[prompt], outputs=[output1])
         | 
| 311 | 
            +
                    run2=run.click(send_it2, inputs=[prompt], outputs=[output2])
         | 
| 312 | 
            +
                    run3=run.click(send_it3, inputs=[prompt], outputs=[output3])
         | 
| 313 | 
            +
                    run4=run.click(send_it4, inputs=[prompt], outputs=[output4])
         | 
| 314 | 
            +
                    run5=run.click(send_it5, inputs=[prompt], outputs=[output5])
         | 
| 315 | 
            +
                    run6=run.click(send_it6, inputs=[prompt], outputs=[output6])
         | 
| 316 | 
            +
                    run7=run.click(send_it7, inputs=[prompt], outputs=[output7])
         | 
| 317 | 
            +
                    run8=run.click(send_it8, inputs=[prompt], outputs=[output8])
         | 
| 318 | 
            +
                    run9=run.click(send_it9, inputs=[prompt], outputs=[output9])
         | 
| 319 | 
            +
                    run10=run.click(send_it10, inputs=[prompt], outputs=[output10])
         | 
| 320 | 
            +
                    run11=run.click(send_it11, inputs=[prompt], outputs=[output11])
         | 
| 321 | 
            +
                    run12=run.click(send_it12, inputs=[prompt], outputs=[output12])
         | 
| 322 | 
            +
                    run13=run.click(send_it13, inputs=[prompt], outputs=[output13])
         | 
| 323 | 
            +
                    run14=run.click(send_it14, inputs=[prompt], outputs=[output14])
         | 
| 324 | 
            +
                    run15=run.click(send_it15, inputs=[prompt], outputs=[output15])
         | 
| 325 | 
            +
                    run16=run.click(send_it16, inputs=[prompt], outputs=[output16])
         | 
| 326 | 
            +
                    run17=run.click(send_it17, inputs=[prompt], outputs=[output17])
         | 
| 327 | 
            +
                    run18=run.click(send_it18, inputs=[prompt], outputs=[output18])
         | 
| 328 | 
            +
                    run19=run.click(send_it19, inputs=[prompt], outputs=[output19])
         | 
| 329 | 
            +
                    run20=run.click(send_it20, inputs=[prompt], outputs=[output20])
         | 
| 330 | 
            +
                    
         | 
| 331 | 
            +
                    prompt1=see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt],cancels=[run1,run2,run3,run4,run5,run6,run7,run8,run9,run10,run11,run12,run13,run14,run15,run16,run17,run18,run19,run20])
         | 
| 332 | 
            +
                    clear_btn.click(clear_fn, None,
         | 
| 333 | 
            +
                                    [input_text,prompt,output1,output2,output3,output4,output5,output6,output7,output8,output9,output10,output11,output12,output13,output14,output15,output16,output17,output18,output19,output20],
         | 
| 334 | 
            +
                                     cancels=[prompt1,run1,run2,run3,run4,run5,run6,run7,run8,run9,run10,run11,run12,run13,run14,run15,run16,run17,run18,run19,run20])
         | 
| 335 | 
            +
                    tog_box.change(clear_it,tog_box,tog_box,cancels=[run1,run2,run3,run4,run5,run6,run7,run8,run9,run10,run11,run12,run13,run14,run15,run16,run17,run18,run19,run20,prompt1])
         | 
| 336 | 
            +
             | 
| 337 | 
            +
            myface.queue(concurrency_count=600,status_update_rate=1)
         | 
| 338 | 
            +
            myface.launch(inline=True,show_api=False)
         | 
    	
        cake.css
    ADDED
    
    | @@ -0,0 +1,34 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            .lg.svelte-1ma3u5b{
         | 
| 2 | 
            +
            line-height:5em;
         | 
| 3 | 
            +
            background:cornflowerblue;
         | 
| 4 | 
            +
            color:white;!important;
         | 
| 5 | 
            +
            }
         | 
| 6 | 
            +
            .gradio-container-3-18-0 .prose h1{
         | 
| 7 | 
            +
            font-size:4rem;!important;
         | 
| 8 | 
            +
            }
         | 
| 9 | 
            +
            #component-1188.lg.svelte-1ma3u5b{
         | 
| 10 | 
            +
            background:#fd5050;!important;
         | 
| 11 | 
            +
            color:white;!important;
         | 
| 12 | 
            +
            }
         | 
| 13 | 
            +
            #component-1187.lg.svelte-1ma3u5b{
         | 
| 14 | 
            +
            background:#63b163;!important;
         | 
| 15 | 
            +
            color:white;!important;
         | 
| 16 | 
            +
            }
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            #component-1137 h4{
         | 
| 19 | 
            +
            font-size:2rem;!important;
         | 
| 20 | 
            +
            margin:0;!important;
         | 
| 21 | 
            +
            }
         | 
| 22 | 
            +
            #component-1138 h4{
         | 
| 23 | 
            +
            font-size:2rem;!important;
         | 
| 24 | 
            +
            margin:0;!important;
         | 
| 25 | 
            +
            }
         | 
| 26 | 
            +
            #component-1160.block.svelte-faijhx{
         | 
| 27 | 
            +
            height:500px;!important;
         | 
| 28 | 
            +
            }
         | 
| 29 | 
            +
            #component-1160 div.svelte-116rqfv{
         | 
| 30 | 
            +
            height:500px;!important;
         | 
| 31 | 
            +
            }
         | 
| 32 | 
            +
            #component-1160.fixed-height.svelte-zyic3i{
         | 
| 33 | 
            +
            height:500px;!important;
         | 
| 34 | 
            +
            }
         | 

