import os # Use a local directory instead of /tmp to ensure Gradio can serve the files easily on HF BASE_DIR = os.path.dirname(os.path.abspath(__file__)) RESULTS_DIR = os.path.join(BASE_DIR, "results") os.makedirs(RESULTS_DIR, exist_ok=True)