Spaces:
Runtime error
Runtime error
File size: 23,994 Bytes
3543289 f3867da 5559978 e1496ca 40c57ec 6e7e4b0 41c43b6 015b429 a244581 750d045 8e80310 aa44fa8 7b73cc6 a244581 c256597 b07a10b fa7cc62 3972ce6 41546be 67e4e47 d0bb580 b045c1f dd1f8be 0ee1804 bdc2777 ad9894b 6001cee 5048806 1396c9d c256597 1396c9d b486172 1396c9d 65a0769 1396c9d ed9ade5 1396c9d e1496ca 1396c9d 5d33ca3 1396c9d 5048806 c256597 59c3ef8 443094c 030c0d4 43e1bf1 1396c9d 5f6a5b6 750d045 1396c9d 8e80310 1396c9d ad35217 1396c9d 3543289 67c7f32 f8312d7 453e612 0ee1804 dd1f8be ae39566 988c6ac a906897 67e4e47 bdc2777 3972ce6 d0bb580 fa7cc62 b07a10b aa44fa8 8e80310 750d045 842b4fc 65dab5e 5f6a5b6 65a0769 43e1bf1 3543289 287d894 3543289 287d894 3543289 9d99c94 3543289 9d99c94 3543289 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
import gradio as gr
import os
import sys
from pathlib import Path
models = [
"nitrosocke/redshift-diffusion-768",
"DucHaiten/DH_ClassicAnime",
"DucHaiten/DucHaitenAnime",
"DucHaiten/DucHaitenAIart",
"DucHaiten/DucHaitenDreamWorld",
"DucHaiten/DucHaitenJourney",
"DucHaiten/DucHaiten-StyleLikeMe",
"DucHaiten/DucHaitenSuperCute",
"theintuitiveye/HARDblend",
"Hius/DreamFul-V2",
"coreco/seek.art_MEGA",
"stablediffusionapi/cyberrealistic",
"SG161222/Realistic_Vision_V1.4",
"claudfuen/photorealistic-fuen-v1",
"prompthero/funko-diffusion",
"prompthero/midjourney-v4-diffusion",
"prompthero/openjourney-v4",
"FredZhang7/paint-journey-v2",
"x67/shortjourney",
"Joeythemonster/anything-midjourney-v-4-1",
"circulus/sd-semireal-v2.8",
"circulus/sd-anireal-v2.7",
"circulus/sd-anireal-2d-v2",
"circulus/sd-photoreal-v2.7",
"circulus/sd-photoreal-photo-v2",
"circulus/sd-anireal-2.5d-v2",
"circulus/sd-anireal-v2.5",
"circulus/sd-photoreal-semi-v2",
"circulus/sd-photoreal-real-v2",
"circulus/sd-photoreal-v2.5",
"circulus/sd-anireal-3d-v2",
"circulus/sd-anireal-v2.8",
"wavymulder/portraitplus",
"wavymulder/Analog-Diffusion",
"wavymulder/collage-diffusion",
"gsdf/Counterfeit-V2.0",
"stablediffusionapi/counterfeit-v30",
"dreamlike-art/dreamlike-anime-1.0",
"dreamlike-art/dreamlike-diffusion-1.0",
"dreamlike-art/dreamlike-photoreal-2.0",
"stablediffusionapi/amireal",
"Rardilit/Ciffusion_v0.1",
"Nacholmo/meinamixv7-diffusers",
"Korakoe/OpenNiji",
"JamesFlare/pastel-mix", #"andite/pastel-mix",
"aipicasso/picasso-diffusion-1-1",
"darkstorm2150/Protogen_v2.2_Official_Release",
"darkstorm2150/Protogen_Infinity_Official_Release",
"darkstorm2150/Protogen_x3.4_Official_Release",
"darkstorm2150/Protogen_x5.8_Official_Release",
"stablediffusionapi/rev-anim",
"LottePeisch/RevAnimated-Diffusers",
"nousr/robo-diffusion-2-base",
"stablediffusionapi/the-ally",
"stablediffusionapi/tmnd-mix",
"hakurei/waifu-diffusion",
"WarriorMama777/AbyssOrangeMix2",
"Linaqruf/anything-v3.0",
"cag/anything-v3-1",
"iZELX1/Anything-V3-X",
"xyn-ai/anything-v4.0", #"andite/anything-v4.0",
"stablediffusionapi/chillout-app-factory",
"nitrosocke/classic-anim-diffusion",
"aipicasso/cool-japan-diffusion-2-1-2",
"DGSpitzer/Cyberpunk-Anime-Diffusion",
"stablediffusionapi/dark-sushi-mix",
"eimiss/EimisAnimeDiffusion_1.0v",
"nitrosocke/Ghibli-Diffusion",
"iZELX1/Grapefruit",
"xiaolxl/GuoFeng3",
"stablediffusionapi/meinapastel",
"WarriorMama777/AbyssOrangeMix",
"AIARTCHAN/7pa",
"JosephusCheung/ACertainModel",
"JosephusCheung/ACertainThing",
"JosephusCheung/ACertainty",
"AIARTCHAN/AbyssHellHero",
"AIARTCHAN/AbyssMapleVer3",
"AIARTCHAN/AbyssHellVer3",
"stablediffusionapi/all-526-animated",
"AIARTCHAN/anidosmixV2",
"Ojimi/anime-kawai-diffusion",
"kubanemil/AnyLORA",
"swl-models/anything-v2.1",
"mm00/anything-v3.0-light",
"stablediffusionapi/anythingelse-v4",
"stablediffusionapi/anything-v5",
"nitrosocke/Arcane-Diffusion",
"nitrosocke/archer-diffusion",
"D1b4l4p/AsianMix",
"WarriorMama777/BloodOrangeMix",
"stablediffusionapi/camelliamix25d",
"stablediffusionapi/camelliamixline",
"Powidl43/CamelliaMix",
"stablediffusionapi/cetusmix",
"stablediffusionapi/chikmix",
"stablediffusionapi/cosmic-babes",
"gsdf/counterfeit-v1.0",
"stablediffusionapi/dark-sushi-25d",
## "WarriorMama777/EerieOrangeMix",
"stablediffusionapi/icomix-2",
"Envvi/Inkpunk-Diffusion",
"dallinmackay/JWST-Deep-Space-diffusion",
"stablediffusionapi/meinaalter",
"AIARTCHAN/MIX-Pro-V4",
"Lykon/NeverEnding-Dream",
"NoCrypt/SomethingV2_2",
"NoCrypt/SomethingV2",
## "stablediffusionapi/three-delicacy",
## "stablediffusionapi/three-delicacy-wonto",
"etherealxx/systemy-csrmodel-cutesexyrobutts", #"andite/cutesexyrobutts-diffusion",
"sd-dreambooth-library/true-guweiz-style", # "andite/guweiz-diffusion",
###"mio/hiten", #"andite/hiten-diffusion",
### "andite/mashuu-diffusion",
### "andite/mignon-diffusion",
### "andite/mikapikazo-diffusion",
### "andite/piromizu-diffusion",
"Fictiverse/Stable_Diffusion_BalloonArt_Model",
"nitrosocke/elden-ring-diffusion",
"nitrosocke/Future-Diffusion",
"prompthero/linkedin-diffusion",
"nitrosocke/mo-di-diffusion",
"claudfuen/photorealistic-fuen-v1",
"AstraliteHeart/pony-diffusion",
"prompthero/poolsuite-diffusion",
"SG161222/Realistic_Vision_V1.4",
"nitrosocke/redshift-diffusion",
"nousr/robo-diffusion",
"nitrosocke/spider-verse-diffusion",
"runwayml/stable-diffusion-v1-5",
"wavymulder/timeless-diffusion",
"naclbit/trinart_stable_diffusion_v2",
"dallinmackay/Tron-Legacy-diffusion",
"dallinmackay/Van-Gogh-diffusion",
"wavymulder/wavyfusion"
]
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=False),
gr.Interface.load(f"models/{models[1]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[2]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[3]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[4]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[5]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[6]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[7]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[8]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[9]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[10]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[11]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[12]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[13]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[14]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[15]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[16]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[17]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[18]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[19]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[20]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[21]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[22]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[23]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[24]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[25]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[26]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[27]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[28]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[29]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[30]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[31]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[32]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[33]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[34]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[35]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[36]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[37]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[38]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[39]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[40]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[41]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[42]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[43]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[44]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[45]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[46]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[47]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[48]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[49]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[50]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[51]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[52]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[53]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[54]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[55]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[56]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[57]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[58]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[59]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[60]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[61]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[62]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[63]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[64]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[65]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[66]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[67]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[68]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[69]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[70]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[71]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[72]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[73]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[74]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[75]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[76]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[77]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[78]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[79]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[80]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[81]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[82]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[83]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[84]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[85]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[86]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[87]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[88]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[89]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[90]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[91]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[92]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[93]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[94]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[95]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[96]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[97]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[98]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[99]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[100]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[101]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[102]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[103]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[104]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[105]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[106]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[107]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[108]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[109]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[110]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[111]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[112]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[113]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[114]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[115]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[116]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[117]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[118]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[119]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[120]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[121]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[122]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[123]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[124]}",live=True,preprocess=False),
gr.Interface.load(f"models/{models[125]}",live=True,preprocess=False),
]
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("""<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="twitter:card" content="player"/>
<meta name="twitter:site" content=""/>
<meta name="twitter:player" content="https://omnibus-maximum-multiplier-places.hf.space"/>
<meta name="twitter:player:stream" content="https://omnibus-maximum-multiplier-places.hf.space"/>
<meta name="twitter:player:width" content="100%"/>
<meta name="twitter:player:height" content="600"/>
<meta property="og:title" content="Embedded Live Viewer"/>
<meta property="og:description" content="Tweet Genie - A Huggingface Space"/>
<meta property="og:image" content="https://cdn.glitch.global/80dbe92e-ce75-44af-84d5-74a2e21e9e55/omnicard.png?v=1676772531627"/>
<!--<meta http-equiv="refresh" content="0; url=https://huggingface.co/spaces/corbt/tweet-genie">-->
</head>
</html>
""")
with gr.Row():
with gr.Tab("Title"):
gr.HTML(""" <title>Maximum Multiplier</title><div style="text-align: center; max-width: 1500px; margin: 0 auto;">
<h1>Everything</h1>
<br><br><h4>It just does a lot of things at the same time</h4>
""")
with gr.Tab("Description"):
gr.HTML("""<div style="text-align:center;">
<h4>As many Text-to-Image Models as I can fit here</h4><br>
<h4>Suggest more up in the "Community" button</h4>
</div>""")
with gr.Tab("Tools"):
with gr.Tab("View"):
with gr.Row():
with gr.Column(style="width=50%, height=70%"):
gr.Pil(label="Crop")
with gr.Column(style="width=50%, height=70%"):
gr.Pil(label="Crop")
with gr.Tab("Draw"):
with gr.Column(style="width=50%, height=70%"):
gr.Pil(label="Crop")
with gr.Column(style="width=50%, height=70%"):
gr.Pil(label="Draw")
gr.ImagePaint(label="Draw")
with gr.Tab("Text"):
with gr.Row():
with gr.Column(scale=50):
gr.Textbox(label="", lines=8, interactive=True)
with gr.Column(scale=50):
gr.Textbox(label="", lines=8, interactive=True)
with gr.Tab("Color Picker"):
with gr.Row():
with gr.Column(scale=50):
gr.ColorPicker(label="Color", interactive=True)
with gr.Column(scale=50):
gr.ImagePaint(label="Draw", interactive=True)
with gr.Row():
with gr.Column():
input_text=gr.Textbox(label="Prompt Idea",lines=2)
#Model selection dropdown
model_name1 = gr.Dropdown(show_label=False, choices=[m for m in models], type="index", value=current_model, interactive=True)
with gr.Column():
use_short=gr.Button("Use Short Prompt")
see_prompts=gr.Button("Extend Idea")
run=gr.Button("Generate Images")
with gr.Tab("Main"):
with gr.Row():
output1=gr.Image(label=(f"{current_model}"))
output2=gr.Image(label=(f"{current_model}"))
output3=gr.Image(label=(f"{current_model}"))
output4=gr.Image(label=(f"{current_model}"))
with gr.Row():
magic1=gr.Textbox(lines=4)
magic2=gr.Textbox(lines=4)
magic3=gr.Textbox(lines=4)
magic4=gr.Textbox(lines=4)
with gr.Row():
output5=gr.Image(label=(f"{current_model}"))
output6=gr.Image(label=(f"{current_model}"))
output7=gr.Image(label=(f"{current_model}"))
output8=gr.Image(label=(f"{current_model}"))
with gr.Row():
magic5=gr.Textbox(lines=4)
magic6=gr.Textbox(lines=4)
magic7=gr.Textbox(lines=4)
magic8=gr.Textbox(lines=4)
def short_prompt(inputs):
return(inputs)
model_name1.change(set_model,inputs=model_name1,outputs=[output1,output2,output3,output4,output5,output6,output7,output8])
run.click(send_it1, inputs=[magic1, model_name1], outputs=[output1])
run.click(send_it2, inputs=[magic2, model_name1], outputs=[output2])
run.click(send_it3, inputs=[magic3, model_name1], outputs=[output3])
run.click(send_it4, inputs=[magic4, model_name1], outputs=[output4])
run.click(send_it5, inputs=[magic5, model_name1], outputs=[output5])
run.click(send_it6, inputs=[magic6, model_name1], outputs=[output6])
run.click(send_it7, inputs=[magic7, model_name1], outputs=[output7])
run.click(send_it8, inputs=[magic8, model_name1], outputs=[output8])
use_short.click(short_prompt,inputs=[input_text],outputs=magic1)
use_short.click(short_prompt,inputs=[input_text],outputs=magic2)
use_short.click(short_prompt,inputs=[input_text],outputs=magic3)
use_short.click(short_prompt,inputs=[input_text],outputs=magic4)
use_short.click(short_prompt,inputs=[input_text],outputs=magic5)
use_short.click(short_prompt,inputs=[input_text],outputs=magic6)
use_short.click(short_prompt,inputs=[input_text],outputs=magic7)
use_short.click(short_prompt,inputs=[input_text],outputs=magic8)
see_prompts.click(text_it1,inputs=[input_text],outputs=magic1)
see_prompts.click(text_it2,inputs=[input_text],outputs=magic2)
see_prompts.click(text_it3,inputs=[input_text],outputs=magic3)
see_prompts.click(text_it4,inputs=[input_text],outputs=magic4)
see_prompts.click(text_it5,inputs=[input_text],outputs=magic5)
see_prompts.click(text_it6,inputs=[input_text],outputs=magic6)
see_prompts.click(text_it7,inputs=[input_text],outputs=magic7)
see_prompts.click(text_it8,inputs=[input_text],outputs=magic8)
myface.queue(concurrency_count=200)
myface.launch(inline=True, show_api=False, max_threads=400) |