phenomenon1981 commited on
Commit
835014c
·
1 Parent(s): d2fbcff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -22,7 +22,7 @@ queue_length_counter = 0
22
  def send_it1(inputs, noise_level, proc1=proc1):
23
  global queue_length_counter
24
  prompt_with_noise = add_random_noise(inputs, noise_level)
25
- if queue_length_counter >= 25:
26
  if not queue.empty():
27
  queue.queue.clear()
28
  queue_length_counter = 0
@@ -34,7 +34,7 @@ def send_it1(inputs, noise_level, proc1=proc1):
34
  def send_it2(inputs, noise_level, proc1=proc1):
35
  global queue_length_counter
36
  prompt_with_noise = add_random_noise(inputs, noise_level)
37
- if queue_length_counter >= 25:
38
  if not queue.empty():
39
  queue.queue.clear()
40
  queue_length_counter = 0
@@ -46,7 +46,7 @@ def send_it2(inputs, noise_level, proc1=proc1):
46
  def send_it3(inputs, noise_level, proc1=proc1):
47
  global queue_length_counter
48
  prompt_with_noise = add_random_noise(inputs, noise_level)
49
- if queue_length_counter >= 25:
50
  if not queue.empty():
51
  queue.queue.clear()
52
  queue_length_counter = 0
@@ -58,7 +58,7 @@ def send_it3(inputs, noise_level, proc1=proc1):
58
  def send_it4(inputs, noise_level, proc1=proc1):
59
  global queue_length_counter
60
  prompt_with_noise = add_random_noise(inputs, noise_level)
61
- if queue_length_counter >= 25:
62
  if not queue.empty():
63
  queue.queue.clear()
64
  queue_length_counter = 0
@@ -70,7 +70,7 @@ def send_it4(inputs, noise_level, proc1=proc1):
70
  def send_it5(inputs, noise_level, proc5=proc5):
71
  global queue_length_counter
72
  prompt_with_noise = add_random_noise(inputs, noise_level)
73
- if queue_length_counter >= 25:
74
  if not queue.empty():
75
  queue.queue.clear()
76
  queue_length_counter = 0
@@ -82,7 +82,7 @@ def send_it5(inputs, noise_level, proc5=proc5):
82
  def send_it6(inputs, noise_level, proc5=proc5):
83
  global queue_length_counter
84
  prompt_with_noise = add_random_noise(inputs, noise_level)
85
- if queue_length_counter >= 25:
86
  if not queue.empty():
87
  queue.queue.clear()
88
  queue_length_counter = 0
@@ -94,7 +94,7 @@ def send_it6(inputs, noise_level, proc5=proc5):
94
  def send_it7(inputs, noise_level, proc5=proc5):
95
  global queue_length_counter
96
  prompt_with_noise = add_random_noise(inputs, noise_level)
97
- if queue_length_counter >= 25:
98
  if not queue.empty():
99
  queue.queue.clear()
100
  queue_length_counter = 0
@@ -106,7 +106,7 @@ def send_it7(inputs, noise_level, proc5=proc5):
106
  def send_it8(inputs, noise_level, proc5=proc5):
107
  global queue_length_counter
108
  prompt_with_noise = add_random_noise(inputs, noise_level)
109
- if queue_length_counter >= 25:
110
  if not queue.empty():
111
  queue.queue.clear()
112
  queue_length_counter = 0
@@ -119,7 +119,7 @@ def send_it8(inputs, noise_level, proc5=proc5):
119
 
120
  def get_prompts(prompt_text):
121
  global queue_length_counter
122
- if queue_length_counter >= 25:
123
  if not queue.empty():
124
  queue.queue.clear()
125
  queue_length_counter = 0
@@ -141,7 +141,7 @@ with gr.Blocks() as myface:
141
  run=gr.Button("Generate", blocking=True)
142
 
143
  with gr.Row():
144
- like_message = gr.Button("Press the Like Button if you enjoy my space", font_size=20)
145
  with gr.Row():
146
  output1=gr.Image(label="Dreamlike Photoreal 2.0", blocking=True, timeout=30)
147
  output2=gr.Image(label="Dreamlike Photoreal 2.0", blocking=True, timeout=30)
 
22
  def send_it1(inputs, noise_level, proc1=proc1):
23
  global queue_length_counter
24
  prompt_with_noise = add_random_noise(inputs, noise_level)
25
+ if queue_length_counter >= 15:
26
  if not queue.empty():
27
  queue.queue.clear()
28
  queue_length_counter = 0
 
34
  def send_it2(inputs, noise_level, proc1=proc1):
35
  global queue_length_counter
36
  prompt_with_noise = add_random_noise(inputs, noise_level)
37
+ if queue_length_counter >= 15:
38
  if not queue.empty():
39
  queue.queue.clear()
40
  queue_length_counter = 0
 
46
  def send_it3(inputs, noise_level, proc1=proc1):
47
  global queue_length_counter
48
  prompt_with_noise = add_random_noise(inputs, noise_level)
49
+ if queue_length_counter >= 15:
50
  if not queue.empty():
51
  queue.queue.clear()
52
  queue_length_counter = 0
 
58
  def send_it4(inputs, noise_level, proc1=proc1):
59
  global queue_length_counter
60
  prompt_with_noise = add_random_noise(inputs, noise_level)
61
+ if queue_length_counter >= 15:
62
  if not queue.empty():
63
  queue.queue.clear()
64
  queue_length_counter = 0
 
70
  def send_it5(inputs, noise_level, proc5=proc5):
71
  global queue_length_counter
72
  prompt_with_noise = add_random_noise(inputs, noise_level)
73
+ if queue_length_counter >= 15:
74
  if not queue.empty():
75
  queue.queue.clear()
76
  queue_length_counter = 0
 
82
  def send_it6(inputs, noise_level, proc5=proc5):
83
  global queue_length_counter
84
  prompt_with_noise = add_random_noise(inputs, noise_level)
85
+ if queue_length_counter >= 15:
86
  if not queue.empty():
87
  queue.queue.clear()
88
  queue_length_counter = 0
 
94
  def send_it7(inputs, noise_level, proc5=proc5):
95
  global queue_length_counter
96
  prompt_with_noise = add_random_noise(inputs, noise_level)
97
+ if queue_length_counter >= 15:
98
  if not queue.empty():
99
  queue.queue.clear()
100
  queue_length_counter = 0
 
106
  def send_it8(inputs, noise_level, proc5=proc5):
107
  global queue_length_counter
108
  prompt_with_noise = add_random_noise(inputs, noise_level)
109
+ if queue_length_counter >= 15:
110
  if not queue.empty():
111
  queue.queue.clear()
112
  queue_length_counter = 0
 
119
 
120
  def get_prompts(prompt_text):
121
  global queue_length_counter
122
+ if queue_length_counter >= 15:
123
  if not queue.empty():
124
  queue.queue.clear()
125
  queue_length_counter = 0
 
141
  run=gr.Button("Generate", blocking=True)
142
 
143
  with gr.Row():
144
+ like_message = gr.Button("Press the Like Button if you enjoy my space",)
145
  with gr.Row():
146
  output1=gr.Image(label="Dreamlike Photoreal 2.0", blocking=True, timeout=30)
147
  output2=gr.Image(label="Dreamlike Photoreal 2.0", blocking=True, timeout=30)