Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -74,9 +74,10 @@ if uploaded_file is not None:
|
|
74 |
buf = BytesIO()
|
75 |
result.save(buf, format="png")
|
76 |
if len(os.listdir('generated_samples')) <= 10:
|
|
|
77 |
|
78 |
_ = huggingface_hub.upload_file(path_or_fileobj = 'out.png',
|
79 |
-
path_in_repo =
|
80 |
repo_id='AfrodreamsAI/afrodreams',
|
81 |
repo_type='space',
|
82 |
token=HF_TOKEN
|
|
|
74 |
buf = BytesIO()
|
75 |
result.save(buf, format="png")
|
76 |
if len(os.listdir('generated_samples')) <= 10:
|
77 |
+
img_file_name = f"generated_samples/{str(len(os.listdir('generated_samples')))}.png"
|
78 |
|
79 |
_ = huggingface_hub.upload_file(path_or_fileobj = 'out.png',
|
80 |
+
path_in_repo ="remote/" + img_file_name,
|
81 |
repo_id='AfrodreamsAI/afrodreams',
|
82 |
repo_type='space',
|
83 |
token=HF_TOKEN
|