From 84cdcf36473e157b59b86c51efbaf642454e13c2 Mon Sep 17 00:00:00 2001 From: Ali Abdalla Date: Thu, 21 Apr 2022 02:06:51 +0200 Subject: [PATCH] fixing demo issue with website (#1047) --- website/upload_notebooks/run.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/upload_notebooks/run.py b/website/upload_notebooks/run.py index ed18ccbfa0..a0d18b5587 100644 --- a/website/upload_notebooks/run.py +++ b/website/upload_notebooks/run.py @@ -44,7 +44,8 @@ def run(): ) demo_folder_file.Upload() demo_folder = demo_folder_file.metadata["id"] - for demo_name in os.listdir(GRADIO_DEMO_DIR): + for demo_name in [demo_dir for demo_dir in os.listdir(GRADIO_DEMO_DIR) + if os.path.isdir(os.path.join(GRADIO_DEMO_DIR, demo_dir))]: notebook_title = demo_name + ".ipynb" print("--- " + demo_name + " ---") with open(os.path.join(GRADIO_DEMO_DIR, demo_name, "run.py")) as demo_file: