Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -100,7 +100,10 @@ async def infer(model_str, prompt, nprompt="", height=None, width=None, steps=No
|
|
100 |
result = None
|
101 |
if task.done() and result is not None:
|
102 |
with lock:
|
103 |
-
|
|
|
|
|
|
|
104 |
result.save(png_path)
|
105 |
image = str(Path(png_path).resolve())
|
106 |
return image
|
|
|
100 |
result = None
|
101 |
if task.done() and result is not None:
|
102 |
with lock:
|
103 |
+
nb_rand1=randint(1, MAX_SEED)
|
104 |
+
nb_rand2=randint(1, MAX_SEED)
|
105 |
+
nb_rand3=randint(1, MAX_SEED)
|
106 |
+
png_path = f"image_{nb_rand1}_{nb_rand2}_{nb_rand3}.png"
|
107 |
result.save(png_path)
|
108 |
image = str(Path(png_path).resolve())
|
109 |
return image
|