Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -268,7 +268,7 @@ def background_next_image():
|
|
268 |
prevs_df = pd.concat((prevs_df, tmp_df))
|
269 |
# we can free up storage by deleting the image
|
270 |
if len(prevs_df) > 50:
|
271 |
-
oldest_path = prevs_df.iloc[
|
272 |
if os.path.isfile(oldest_path):
|
273 |
os.remove(oldest_path)
|
274 |
else:
|
|
|
268 |
prevs_df = pd.concat((prevs_df, tmp_df))
|
269 |
# we can free up storage by deleting the image
|
270 |
if len(prevs_df) > 50:
|
271 |
+
oldest_path = prevs_df.iloc[6]['paths']
|
272 |
if os.path.isfile(oldest_path):
|
273 |
os.remove(oldest_path)
|
274 |
else:
|