Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,16 +6,17 @@ save_loc="Gens/"+date.today().__str__()+"/"
|
|
6 |
os.makedirs(save_loc,exist_ok=True)
|
7 |
|
8 |
model_dic={}
|
9 |
-
model_dic["None"]={
|
10 |
-
"model_loc":base_model,
|
11 |
-
"model_trigger":"high res, 4k",
|
12 |
-
}
|
13 |
|
14 |
model_dic["ISS MAP"]={
|
15 |
"model_loc":"jarvissan22/iss_nikond5:6ff0c8d11e33e4e8c91b1b9175a1c03f32fb559641bbbbe7007ac07b22fc5cec",
|
16 |
"model_trigger":"Aerial photo taken from the ISS photo taken from the ISS",
|
17 |
}
|
18 |
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
model_dic["Ukiyo-e_川瀬巴水"]={
|
21 |
"model_loc":"jarvissan22/kawasehasui_backgrounds:a4bb8bb1beb503b02c93789381544097dcb70afc92c512ea1500e70ccf704bc4",
|
@@ -34,8 +35,8 @@ model_dic["Anime_niji"]={
|
|
34 |
|
35 |
|
36 |
|
37 |
-
gallery=[] #Gallery array to hold image outputs
|
38 |
-
def gradio_gen_process(img,prompt,ps=0.6,style_model=
|
39 |
#JP Detect
|
40 |
if jp:
|
41 |
prompt=DeepL(prompt)
|
@@ -52,7 +53,7 @@ def gradio_gen_process(img,prompt,ps=0.6,style_model=None,ls=0.6,jp=None,recipie
|
|
52 |
print(img)
|
53 |
try:
|
54 |
img,file_saveloc=Gen_image(prompt,img=img,ps=ps,lr=ls,model=model,save_loc=save_loc)
|
55 |
-
gallery.append(img)
|
56 |
except:
|
57 |
recipient_email=None
|
58 |
print("Error:Image gen fail")
|
@@ -87,7 +88,7 @@ gradio_interface=gr.Interface(
|
|
87 |
],
|
88 |
outputs=[
|
89 |
gr.Image(label="gened image",type="pil"),
|
90 |
-
|
91 |
],
|
92 |
examples="Tiles/"
|
93 |
)
|
|
|
6 |
os.makedirs(save_loc,exist_ok=True)
|
7 |
|
8 |
model_dic={}
|
|
|
|
|
|
|
|
|
9 |
|
10 |
model_dic["ISS MAP"]={
|
11 |
"model_loc":"jarvissan22/iss_nikond5:6ff0c8d11e33e4e8c91b1b9175a1c03f32fb559641bbbbe7007ac07b22fc5cec",
|
12 |
"model_trigger":"Aerial photo taken from the ISS photo taken from the ISS",
|
13 |
}
|
14 |
|
15 |
+
model_dic["None"]={
|
16 |
+
"model_loc":base_model,
|
17 |
+
"model_trigger":"high res, 4k",
|
18 |
+
}
|
19 |
+
|
20 |
|
21 |
model_dic["Ukiyo-e_川瀬巴水"]={
|
22 |
"model_loc":"jarvissan22/kawasehasui_backgrounds:a4bb8bb1beb503b02c93789381544097dcb70afc92c512ea1500e70ccf704bc4",
|
|
|
35 |
|
36 |
|
37 |
|
38 |
+
#gallery=[] #Gallery array to hold image outputs
|
39 |
+
def gradio_gen_process(img,prompt,ps=0.6,style_model="ISS MAP",ls=0.6,jp=None,recipient_email=None,model=base_model,model_trigger=None,save_loc=save_loc):
|
40 |
#JP Detect
|
41 |
if jp:
|
42 |
prompt=DeepL(prompt)
|
|
|
53 |
print(img)
|
54 |
try:
|
55 |
img,file_saveloc=Gen_image(prompt,img=img,ps=ps,lr=ls,model=model,save_loc=save_loc)
|
56 |
+
#gallery.append(img)
|
57 |
except:
|
58 |
recipient_email=None
|
59 |
print("Error:Image gen fail")
|
|
|
88 |
],
|
89 |
outputs=[
|
90 |
gr.Image(label="gened image",type="pil"),
|
91 |
+
# gr.Gallery()
|
92 |
],
|
93 |
examples="Tiles/"
|
94 |
)
|