Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ import requests
|
|
5 |
import uuid
|
6 |
import io
|
7 |
import base64
|
|
|
8 |
from transforms import RGBTransform # from source code mentioned above
|
9 |
|
10 |
|
@@ -30,11 +31,16 @@ def run_dif_color(out_prompt,model_drop,cnt,color,tint):
|
|
30 |
out_box=[]
|
31 |
out_html=""
|
32 |
#for i,ea in enumerate(loaded_model):
|
|
|
|
|
|
|
33 |
for i in range(int(cnt)):
|
34 |
-
|
|
|
|
|
35 |
try:
|
36 |
-
model=gr.load(f'models/{model[int(model_drop)]}')
|
37 |
-
|
38 |
out_img=model(out_prompt+p_seed)
|
39 |
print(out_img)
|
40 |
|
|
|
5 |
import uuid
|
6 |
import io
|
7 |
import base64
|
8 |
+
import random
|
9 |
from transforms import RGBTransform # from source code mentioned above
|
10 |
|
11 |
|
|
|
31 |
out_box=[]
|
32 |
out_html=""
|
33 |
#for i,ea in enumerate(loaded_model):
|
34 |
+
|
35 |
+
|
36 |
+
|
37 |
for i in range(int(cnt)):
|
38 |
+
rand=random.randint(1,500)
|
39 |
+
for i in range(rand):
|
40 |
+
p_seed+=" "
|
41 |
try:
|
42 |
+
#model=gr.load(f'models/{model[int(model_drop)]}')
|
43 |
+
model=loaded_model[int(model_drop)]
|
44 |
out_img=model(out_prompt+p_seed)
|
45 |
print(out_img)
|
46 |
|