Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
mariesig commited on
Commit ·
3471350
1
Parent(s): b263a47
fix logo and clean up
Browse files- app.py +5 -1
- assets/logo.svg +21 -0
app.py
CHANGED
|
@@ -16,6 +16,7 @@ from constants import (
|
|
| 16 |
EXAMPLES_DIR,
|
| 17 |
NOISE_TYPES,
|
| 18 |
MINUTES_KEEP,
|
|
|
|
| 19 |
)
|
| 20 |
from aic_api import ApiParamsV2, process_file_v2
|
| 21 |
from aic_sdk import SDKParams, process_file_sdk
|
|
@@ -162,6 +163,9 @@ def delete_previous_enhancement(path_to_delete: str):
|
|
| 162 |
logger.warning(f"No files found to delete containing '{filename_no_ext}' in {base_dir}")
|
| 163 |
except Exception as e:
|
| 164 |
logger.warning(f"Failed to delete files containing '{filename_no_ext}' in {base_dir}: {e}")
|
|
|
|
|
|
|
|
|
|
| 165 |
|
| 166 |
|
| 167 |
def start_processing(
|
|
@@ -204,7 +208,7 @@ with gr.Blocks(delete_cache=(7200, 7200)) as demo:
|
|
| 204 |
input_enhancement = gr.State()
|
| 205 |
with gr.Row():
|
| 206 |
gr.Image(
|
| 207 |
-
value="
|
| 208 |
label=None,
|
| 209 |
show_download_button=False,
|
| 210 |
interactive=False,
|
|
|
|
| 16 |
EXAMPLES_DIR,
|
| 17 |
NOISE_TYPES,
|
| 18 |
MINUTES_KEEP,
|
| 19 |
+
EXAMPLES,
|
| 20 |
)
|
| 21 |
from aic_api import ApiParamsV2, process_file_v2
|
| 22 |
from aic_sdk import SDKParams, process_file_sdk
|
|
|
|
| 163 |
logger.warning(f"No files found to delete containing '{filename_no_ext}' in {base_dir}")
|
| 164 |
except Exception as e:
|
| 165 |
logger.warning(f"Failed to delete files containing '{filename_no_ext}' in {base_dir}: {e}")
|
| 166 |
+
cleanup_tmp(
|
| 167 |
+
minutes_keep=120, filter=EXAMPLES
|
| 168 |
+
) # ensure cleanup of tmp files not created by gradio
|
| 169 |
|
| 170 |
|
| 171 |
def start_processing(
|
|
|
|
| 208 |
input_enhancement = gr.State()
|
| 209 |
with gr.Row():
|
| 210 |
gr.Image(
|
| 211 |
+
value="assets/logo.svg",
|
| 212 |
label=None,
|
| 213 |
show_download_button=False,
|
| 214 |
interactive=False,
|
assets/logo.svg
ADDED
|
|