phenomenon1981 commited on
Commit
5731904
1 Parent(s): da72c43

Update app.py

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