phenomenon1981
commited on
Commit
•
b1ff3ae
1
Parent(s):
fc2b285
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,9 @@ import torch
|
|
5 |
import random
|
6 |
from pathlib import Path
|
7 |
|
|
|
|
|
|
|
8 |
proc1=gr.Interface.load("models/dreamlike-art/dreamlike-photoreal-2.0")
|
9 |
proc2=gr.Interface.load("models/dreamlike-art/dreamlike-photoreal-2.0")
|
10 |
proc3=gr.Interface.load("models/dreamlike-art/dreamlike-photoreal-2.0")
|
@@ -16,9 +19,6 @@ proc7=gr.Interface.load("models/dreamlike-art/dreamlike-diffusion-1.0")
|
|
16 |
proc8=gr.Interface.load("models/dreamlike-art/dreamlike-diffusion-1.0")
|
17 |
|
18 |
|
19 |
-
text_gen=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion")
|
20 |
-
|
21 |
-
|
22 |
def send_it1(inputs,proc1=proc1):
|
23 |
output1=proc1(inputs)
|
24 |
return(output1)
|
@@ -61,46 +61,6 @@ with gr.Blocks() as myface:
|
|
61 |
|
62 |
prompt=gr.Textbox(label="Prettified Prompt")
|
63 |
run=gr.Button("Launch")
|
64 |
-
|
65 |
-
with gr.Row():
|
66 |
-
seed_input = gr.Textbox(label="Enter Seed Number")
|
67 |
-
|
68 |
-
def send_it1(prompt,seed):
|
69 |
-
torch.manual_seed(int(seed))
|
70 |
-
output1 = proc1(prompt)
|
71 |
-
return output1
|
72 |
-
def send_it2(prompt,seed):
|
73 |
-
torch.manual_seed(int(seed))
|
74 |
-
output2 = proc2(prompt)
|
75 |
-
return output2
|
76 |
-
def send_it1(prompt,seed):
|
77 |
-
torch.manual_seed(int(seed))
|
78 |
-
output1 = proc3(prompt)
|
79 |
-
return output3
|
80 |
-
def send_it2(prompt,seed):
|
81 |
-
torch.manual_seed(int(seed))
|
82 |
-
output2 = proc4(prompt)
|
83 |
-
return output4
|
84 |
-
def send_it1(prompt,seed):
|
85 |
-
torch.manual_seed(int(seed))
|
86 |
-
output1 = proc5(prompt)
|
87 |
-
return output5
|
88 |
-
def send_it2(prompt,seed):
|
89 |
-
torch.manual_seed(int(seed))
|
90 |
-
output2 = proc6(prompt)
|
91 |
-
return output6
|
92 |
-
def send_it1(prompt,seed):
|
93 |
-
torch.manual_seed(int(seed))
|
94 |
-
output1 = proc7(prompt)
|
95 |
-
return output7
|
96 |
-
def send_it2(prompt,seed):
|
97 |
-
torch.manual_seed(int(seed))
|
98 |
-
output2 = proc8(prompt)
|
99 |
-
return output8
|
100 |
-
return output1, output2, output3, output4, output5, output6, output7, output8
|
101 |
-
|
102 |
-
run.click(run_models, inputs=[prompt, seed_input], outputs=[output1, output2, output3, output4, output5, output6, output7, output8])
|
103 |
-
|
104 |
|
105 |
|
106 |
with gr.Row():
|
|
|
5 |
import random
|
6 |
from pathlib import Path
|
7 |
|
8 |
+
text_gen=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion")
|
9 |
+
|
10 |
+
|
11 |
proc1=gr.Interface.load("models/dreamlike-art/dreamlike-photoreal-2.0")
|
12 |
proc2=gr.Interface.load("models/dreamlike-art/dreamlike-photoreal-2.0")
|
13 |
proc3=gr.Interface.load("models/dreamlike-art/dreamlike-photoreal-2.0")
|
|
|
19 |
proc8=gr.Interface.load("models/dreamlike-art/dreamlike-diffusion-1.0")
|
20 |
|
21 |
|
|
|
|
|
|
|
22 |
def send_it1(inputs,proc1=proc1):
|
23 |
output1=proc1(inputs)
|
24 |
return(output1)
|
|
|
61 |
|
62 |
prompt=gr.Textbox(label="Prettified Prompt")
|
63 |
run=gr.Button("Launch")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
|
66 |
with gr.Row():
|