Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -44,11 +44,12 @@ def add_random_noise(prompt, noise_level=1.00):
|
|
44 |
|
45 |
def build():
|
46 |
def zip_files():
|
47 |
-
|
|
|
48 |
for file in b.imagens:
|
49 |
zipObj.write(file, os.path.basename(file))
|
50 |
b.imagens = []
|
51 |
-
return
|
52 |
def clear():
|
53 |
return gr.update(value=0),gr.update(value=0)
|
54 |
def start():
|
|
|
44 |
|
45 |
def build():
|
46 |
def zip_files():
|
47 |
+
zip_name = f"{b.prompt.split(' ')[0]}_{random.randint(0, 10000)}.zip"
|
48 |
+
with ZipFile(zip_name, "w") as zipObj:
|
49 |
for file in b.imagens:
|
50 |
zipObj.write(file, os.path.basename(file))
|
51 |
b.imagens = []
|
52 |
+
return zip_name
|
53 |
def clear():
|
54 |
return gr.update(value=0),gr.update(value=0)
|
55 |
def start():
|