Spaces:
Runtime error
Runtime error
phenomenon1981
commited on
Commit
·
25769cc
1
Parent(s):
19b4307
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,6 @@ from pathlib import Path
|
|
5 |
import random
|
6 |
import string
|
7 |
import time
|
8 |
-
from queue import Queue
|
9 |
queue = Queue()
|
10 |
|
11 |
text_gen=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion")
|
@@ -24,7 +23,7 @@ def send_it1(inputs, noise_level, proc1=proc1):
|
|
24 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
25 |
if queue_length_counter >= 15:
|
26 |
if not queue.empty():
|
27 |
-
queue.
|
28 |
queue_length_counter = 0
|
29 |
output1 = proc1(prompt_with_noise)
|
30 |
queue_length_counter += 1
|
@@ -36,7 +35,7 @@ def send_it2(inputs, noise_level, proc1=proc1):
|
|
36 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
37 |
if queue_length_counter >= 15:
|
38 |
if not queue.empty():
|
39 |
-
queue.
|
40 |
queue_length_counter = 0
|
41 |
output2 = proc1(prompt_with_noise)
|
42 |
queue_length_counter += 1
|
@@ -48,7 +47,7 @@ def send_it3(inputs, noise_level, proc1=proc1):
|
|
48 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
49 |
if queue_length_counter >= 15:
|
50 |
if not queue.empty():
|
51 |
-
queue.
|
52 |
queue_length_counter = 0
|
53 |
output3 = proc1(prompt_with_noise)
|
54 |
queue_length_counter += 1
|
@@ -60,7 +59,7 @@ def send_it4(inputs, noise_level, proc1=proc1):
|
|
60 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
61 |
if queue_length_counter >= 15:
|
62 |
if not queue.empty():
|
63 |
-
queue.
|
64 |
queue_length_counter = 0
|
65 |
output4 = proc1(prompt_with_noise)
|
66 |
queue_length_counter += 1
|
@@ -72,7 +71,7 @@ def send_it5(inputs, noise_level, proc5=proc5):
|
|
72 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
73 |
if queue_length_counter >= 15:
|
74 |
if not queue.empty():
|
75 |
-
queue.
|
76 |
queue_length_counter = 0
|
77 |
output5 = proc5(prompt_with_noise)
|
78 |
queue_length_counter += 1
|
@@ -84,7 +83,7 @@ def send_it6(inputs, noise_level, proc5=proc5):
|
|
84 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
85 |
if queue_length_counter >= 15:
|
86 |
if not queue.empty():
|
87 |
-
queue.
|
88 |
queue_length_counter = 0
|
89 |
output6 = proc5(prompt_with_noise)
|
90 |
queue_length_counter += 1
|
@@ -96,7 +95,7 @@ def send_it7(inputs, noise_level, proc5=proc5):
|
|
96 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
97 |
if queue_length_counter >= 15:
|
98 |
if not queue.empty():
|
99 |
-
queue.
|
100 |
queue_length_counter = 0
|
101 |
output7 = proc5(prompt_with_noise)
|
102 |
queue_length_counter += 1
|
@@ -108,7 +107,7 @@ def send_it8(inputs, noise_level, proc5=proc5):
|
|
108 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
109 |
if queue_length_counter >= 15:
|
110 |
if not queue.empty():
|
111 |
-
queue.
|
112 |
queue_length_counter = 0
|
113 |
output8 = proc5(prompt_with_noise)
|
114 |
queue_length_counter += 1
|
@@ -121,7 +120,7 @@ def get_prompts(prompt_text):
|
|
121 |
global queue_length_counter
|
122 |
if queue_length_counter >= 15:
|
123 |
if not queue.empty():
|
124 |
-
queue.
|
125 |
queue_length_counter = 0
|
126 |
output = text_gen(prompt_text)
|
127 |
queue_length_counter += 1
|
|
|
5 |
import random
|
6 |
import string
|
7 |
import time
|
|
|
8 |
queue = Queue()
|
9 |
|
10 |
text_gen=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion")
|
|
|
23 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
24 |
if queue_length_counter >= 15:
|
25 |
if not queue.empty():
|
26 |
+
queue.clear()
|
27 |
queue_length_counter = 0
|
28 |
output1 = proc1(prompt_with_noise)
|
29 |
queue_length_counter += 1
|
|
|
35 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
36 |
if queue_length_counter >= 15:
|
37 |
if not queue.empty():
|
38 |
+
queue.clear()
|
39 |
queue_length_counter = 0
|
40 |
output2 = proc1(prompt_with_noise)
|
41 |
queue_length_counter += 1
|
|
|
47 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
48 |
if queue_length_counter >= 15:
|
49 |
if not queue.empty():
|
50 |
+
queue.clear()
|
51 |
queue_length_counter = 0
|
52 |
output3 = proc1(prompt_with_noise)
|
53 |
queue_length_counter += 1
|
|
|
59 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
60 |
if queue_length_counter >= 15:
|
61 |
if not queue.empty():
|
62 |
+
queue.clear()
|
63 |
queue_length_counter = 0
|
64 |
output4 = proc1(prompt_with_noise)
|
65 |
queue_length_counter += 1
|
|
|
71 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
72 |
if queue_length_counter >= 15:
|
73 |
if not queue.empty():
|
74 |
+
queue.clear()
|
75 |
queue_length_counter = 0
|
76 |
output5 = proc5(prompt_with_noise)
|
77 |
queue_length_counter += 1
|
|
|
83 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
84 |
if queue_length_counter >= 15:
|
85 |
if not queue.empty():
|
86 |
+
queue.clear()
|
87 |
queue_length_counter = 0
|
88 |
output6 = proc5(prompt_with_noise)
|
89 |
queue_length_counter += 1
|
|
|
95 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
96 |
if queue_length_counter >= 15:
|
97 |
if not queue.empty():
|
98 |
+
queue.clear()
|
99 |
queue_length_counter = 0
|
100 |
output7 = proc5(prompt_with_noise)
|
101 |
queue_length_counter += 1
|
|
|
107 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
108 |
if queue_length_counter >= 15:
|
109 |
if not queue.empty():
|
110 |
+
queue.clear()
|
111 |
queue_length_counter = 0
|
112 |
output8 = proc5(prompt_with_noise)
|
113 |
queue_length_counter += 1
|
|
|
120 |
global queue_length_counter
|
121 |
if queue_length_counter >= 15:
|
122 |
if not queue.empty():
|
123 |
+
queue.clear()
|
124 |
queue_length_counter = 0
|
125 |
output = text_gen(prompt_text)
|
126 |
queue_length_counter += 1
|