Spaces:
Build error
Build error
Logs for testing saving image functionality
Browse files- gradio_demo/app.py +6 -1
gradio_demo/app.py
CHANGED
@@ -228,8 +228,10 @@ def main(pretrained_model_name_or_path="wangqixun/YamerMIX_v8", enable_lcm_arg=F
|
|
228 |
image_paths = []
|
229 |
for i, img in enumerate(galleries, start=1):
|
230 |
img_path = f'images/{email}_gallery{i}.png'
|
|
|
231 |
img.save(img_path)
|
232 |
image_paths.append(img_path)
|
|
|
233 |
|
234 |
# Define the CSV file path
|
235 |
csv_file_path = 'image_data.csv'
|
@@ -243,11 +245,14 @@ def main(pretrained_model_name_or_path="wangqixun/YamerMIX_v8", enable_lcm_arg=F
|
|
243 |
'img4_path': [image_paths[3]],
|
244 |
})
|
245 |
|
|
|
|
|
246 |
# Write to CSV (append if the file exists, create a new one if it doesn't)
|
247 |
if not os.path.isfile(csv_file_path):
|
248 |
df.to_csv(csv_file_path, index=False)
|
249 |
else:
|
250 |
df.to_csv(csv_file_path, mode='a', header=False, index=False)
|
|
|
251 |
|
252 |
gr.Info("Thankyou!! Your avatar is on the way to your inbox")
|
253 |
|
@@ -422,7 +427,7 @@ def main(pretrained_model_name_or_path="wangqixun/YamerMIX_v8", enable_lcm_arg=F
|
|
422 |
justify-content: center;
|
423 |
align-items: center;
|
424 |
width: 100%;}
|
425 |
-
sub-btn,#store-btn {
|
426 |
background: linear-gradient(to right, #ffffff, #f2bb13); !important;
|
427 |
color: #254977 !important;
|
428 |
}
|
|
|
228 |
image_paths = []
|
229 |
for i, img in enumerate(galleries, start=1):
|
230 |
img_path = f'images/{email}_gallery{i}.png'
|
231 |
+
print("saving image")
|
232 |
img.save(img_path)
|
233 |
image_paths.append(img_path)
|
234 |
+
print("saved image at path ",img_path)
|
235 |
|
236 |
# Define the CSV file path
|
237 |
csv_file_path = 'image_data.csv'
|
|
|
245 |
'img4_path': [image_paths[3]],
|
246 |
})
|
247 |
|
248 |
+
print("created df ",df)
|
249 |
+
|
250 |
# Write to CSV (append if the file exists, create a new one if it doesn't)
|
251 |
if not os.path.isfile(csv_file_path):
|
252 |
df.to_csv(csv_file_path, index=False)
|
253 |
else:
|
254 |
df.to_csv(csv_file_path, mode='a', header=False, index=False)
|
255 |
+
print("writing to csv",csv_file_path)
|
256 |
|
257 |
gr.Info("Thankyou!! Your avatar is on the way to your inbox")
|
258 |
|
|
|
427 |
justify-content: center;
|
428 |
align-items: center;
|
429 |
width: 100%;}
|
430 |
+
#sub-btn,#store-btn {
|
431 |
background: linear-gradient(to right, #ffffff, #f2bb13); !important;
|
432 |
color: #254977 !important;
|
433 |
}
|