Spaces:
Runtime error
Runtime error
phenomenon1981
commited on
Commit
·
5a7d557
1
Parent(s):
3c715fd
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ proc1=gr.Interface.load("models/dreamlike-art/dreamlike-photoreal-2.0", live=Tru
|
|
14 |
def reset_queue_periodically():
|
15 |
start_time = time.time()
|
16 |
while True:
|
17 |
-
if time.time() - start_time >=
|
18 |
queue.queue.clear()
|
19 |
start_time = time.time()
|
20 |
|
@@ -22,7 +22,7 @@ reset_queue_thread = Thread(target=reset_queue_periodically, daemon=True)
|
|
22 |
reset_queue_thread.start()
|
23 |
|
24 |
queue = Queue()
|
25 |
-
queue_threshold =
|
26 |
|
27 |
def add_random_noise(prompt, noise_level=0.07):
|
28 |
# Get the percentage of characters to add as noise
|
|
|
14 |
def reset_queue_periodically():
|
15 |
start_time = time.time()
|
16 |
while True:
|
17 |
+
if time.time() - start_time >= 120: # 5 minutes
|
18 |
queue.queue.clear()
|
19 |
start_time = time.time()
|
20 |
|
|
|
22 |
reset_queue_thread.start()
|
23 |
|
24 |
queue = Queue()
|
25 |
+
queue_threshold = 15
|
26 |
|
27 |
def add_random_noise(prompt, noise_level=0.07):
|
28 |
# Get the percentage of characters to add as noise
|