phenomenon1981 commited on
Commit
9c1de78
1 Parent(s): 0400493

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +51 -52
app.py CHANGED
@@ -64,45 +64,45 @@ def send_it3(inputs, noise_level, proc1=proc1):
64
  output3 = proc1(prompt_with_noise)
65
  return output3
66
 
67
- def send_it4(inputs, noise_level, proc1=proc1):
68
- prompt_with_noise = add_random_noise(inputs, noise_level)
69
- while queue.qsize() >= queue_threshold:
70
- time.sleep(2)
71
- queue.put(prompt_with_noise)
72
- output4 = proc1(prompt_with_noise)
73
- return output4
74
-
75
- def send_it5(inputs, noise_level, proc1=proc1):
76
- prompt_with_noise = add_random_noise(inputs, noise_level)
77
- while queue.qsize() >= queue_threshold:
78
- time.sleep(2)
79
- queue.put(prompt_with_noise)
80
- output5 = proc1(prompt_with_noise)
81
- return output5
82
-
83
- def send_it6(inputs, noise_level, proc1=proc1):
84
- prompt_with_noise = add_random_noise(inputs, noise_level)
85
- while queue.qsize() >= queue_threshold:
86
- time.sleep(2)
87
- queue.put(prompt_with_noise)
88
- output6 = proc1(prompt_with_noise)
89
- return output6
90
-
91
- def send_it7(inputs, noise_level, proc1=proc1):
92
- prompt_with_noise = add_random_noise(inputs, noise_level)
93
- while queue.qsize() >= queue_threshold:
94
- time.sleep(2)
95
- queue.put(prompt_with_noise)
96
- output7 = proc1(prompt_with_noise)
97
- return output7
98
-
99
- def send_it8(inputs, noise_level, proc1=proc1):
100
- prompt_with_noise = add_random_noise(inputs, noise_level)
101
- while queue.qsize() >= queue_threshold:
102
- time.sleep(2)
103
- queue.put(prompt_with_noise)
104
- output8 = proc1(prompt_with_noise)
105
- return output8
106
 
107
 
108
  with gr.Blocks() as myface:
@@ -121,25 +121,24 @@ with gr.Blocks() as myface:
121
  with gr.Row():
122
  output1=gr.Image(label="Dreamlike Diffusion 1.0")
123
  output2=gr.Image(label="Dreamlike Diffusion 1.0")
124
- with gr.Row():
125
  output3=gr.Image(label="Dreamlike Diffusion 1.0")
126
- output4=gr.Image(label="Dreamlike Diffusion 1.0")
127
- with gr.Row():
128
- output5=gr.Image(label="Dreamlike Diffusion 1.0")
129
- output6=gr.Image(label="Dreamlike Diffusion 1.0")
130
- with gr.Row():
131
- output7=gr.Image(label="Dreamlike Diffusion 1.0")
132
- output8=gr.Image(label="Dreamlike Diffusion 1.0")
133
 
134
  see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt], queue=False)
135
  run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
136
  run.click(send_it2, inputs=[prompt, noise_level], outputs=[output2])
137
  run.click(send_it3, inputs=[prompt, noise_level], outputs=[output3])
138
- run.click(send_it4, inputs=[prompt, noise_level], outputs=[output4])
139
- run.click(send_it5, inputs=[prompt, noise_level], outputs=[output5])
140
- run.click(send_it6, inputs=[prompt, noise_level], outputs=[output6])
141
- run.click(send_it7, inputs=[prompt, noise_level], outputs=[output7])
142
- run.click(send_it8, inputs=[prompt, noise_level], outputs=[output8])
143
 
144
 
145
  myface.launch(enable_queue=True, inline=True)
 
64
  output3 = proc1(prompt_with_noise)
65
  return output3
66
 
67
+ #def send_it4(inputs, noise_level, proc1=proc1):
68
+ #prompt_with_noise = add_random_noise(inputs, noise_level)
69
+ #while queue.qsize() >= queue_threshold:
70
+ #time.sleep(2)
71
+ #queue.put(prompt_with_noise)
72
+ #output4 = proc1(prompt_with_noise)
73
+ #return output4
74
+
75
+ #def send_it5(inputs, noise_level, proc1=proc1):
76
+ #prompt_with_noise = add_random_noise(inputs, noise_level)
77
+ #while queue.qsize() >= queue_threshold:
78
+ #time.sleep(2)
79
+ #queue.put(prompt_with_noise)
80
+ #output5 = proc1(prompt_with_noise)
81
+ #return output5
82
+
83
+ #def send_it6(inputs, noise_level, proc1=proc1):
84
+ #prompt_with_noise = add_random_noise(inputs, noise_level)
85
+ #while queue.qsize() >= queue_threshold:
86
+ #time.sleep(2)
87
+ #queue.put(prompt_with_noise)
88
+ #output6 = proc1(prompt_with_noise)
89
+ #return output6
90
+
91
+ #def send_it7(inputs, noise_level, proc1=proc1):
92
+ #prompt_with_noise = add_random_noise(inputs, noise_level)
93
+ #while queue.qsize() >= queue_threshold:
94
+ #time.sleep(2)
95
+ #queue.put(prompt_with_noise)
96
+ #output7 = proc1(prompt_with_noise)
97
+ #return output7
98
+
99
+ #def send_it8(inputs, noise_level, proc1=proc1):
100
+ #prompt_with_noise = add_random_noise(inputs, noise_level)
101
+ #while queue.qsize() >= queue_threshold:
102
+ #time.sleep(2)
103
+ #queue.put(prompt_with_noise)
104
+ #output8 = proc1(prompt_with_noise)
105
+ #return output8
106
 
107
 
108
  with gr.Blocks() as myface:
 
121
  with gr.Row():
122
  output1=gr.Image(label="Dreamlike Diffusion 1.0")
123
  output2=gr.Image(label="Dreamlike Diffusion 1.0")
 
124
  output3=gr.Image(label="Dreamlike Diffusion 1.0")
125
+ #output4=gr.Image(label="Dreamlike Diffusion 1.0")
126
+ #with gr.Row():
127
+ #output5=gr.Image(label="Dreamlike Diffusion 1.0")
128
+ #output6=gr.Image(label="Dreamlike Diffusion 1.0")
129
+ #with gr.Row():
130
+ #output7=gr.Image(label="Dreamlike Diffusion 1.0")
131
+ #output8=gr.Image(label="Dreamlike Diffusion 1.0")
132
 
133
  see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt], queue=False)
134
  run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
135
  run.click(send_it2, inputs=[prompt, noise_level], outputs=[output2])
136
  run.click(send_it3, inputs=[prompt, noise_level], outputs=[output3])
137
+ #run.click(send_it4, inputs=[prompt, noise_level], outputs=[output4])
138
+ #run.click(send_it5, inputs=[prompt, noise_level], outputs=[output5])
139
+ #run.click(send_it6, inputs=[prompt, noise_level], outputs=[output6])
140
+ #run.click(send_it7, inputs=[prompt, noise_level], outputs=[output7])
141
+ #run.click(send_it8, inputs=[prompt, noise_level], outputs=[output8])
142
 
143
 
144
  myface.launch(enable_queue=True, inline=True)