Update app.py
Browse files
app.py
CHANGED
@@ -85,6 +85,11 @@ def apply_style(style_name: str, positive: str) -> Tuple[str]:
|
|
85 |
p = styles.get(style_name, styles[DEFAULT_STYLE_NAME])
|
86 |
return p.replace("{prompt}", positive)
|
87 |
|
|
|
|
|
|
|
|
|
|
|
88 |
def generate(
|
89 |
prompt: str,
|
90 |
seed: float = 0,
|
@@ -128,13 +133,7 @@ def generate(
|
|
128 |
fn_index=3
|
129 |
)
|
130 |
result = job.result()
|
131 |
-
|
132 |
-
print(file)
|
133 |
-
if file != 'captions.json':
|
134 |
-
img_path = os.path.join(result, file)
|
135 |
-
with open(img_path, 'r') as f:
|
136 |
-
print(f)
|
137 |
-
images.append((f))
|
138 |
return images, seed
|
139 |
|
140 |
examples = [
|
|
|
85 |
p = styles.get(style_name, styles[DEFAULT_STYLE_NAME])
|
86 |
return p.replace("{prompt}", positive)
|
87 |
|
88 |
+
def list_dir(path):
|
89 |
+
for root, dirs, files in os.walk(path):
|
90 |
+
for file in files:
|
91 |
+
print(os.path.join(root, file))
|
92 |
+
|
93 |
def generate(
|
94 |
prompt: str,
|
95 |
seed: float = 0,
|
|
|
133 |
fn_index=3
|
134 |
)
|
135 |
result = job.result()
|
136 |
+
list_dir(result)
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
return images, seed
|
138 |
|
139 |
examples = [
|