From e6da26dc45e7368d31ab6a77656b93f03a14f9c1 Mon Sep 17 00:00:00 2001 From: Looki2000 Date: Mon, 13 Nov 2023 16:22:57 +0100 Subject: [PATCH] added finetune dialogs creation tool that's still work in progress --- finetune_dialogs_tool/main.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 finetune_dialogs_tool/main.py diff --git a/finetune_dialogs_tool/main.py b/finetune_dialogs_tool/main.py new file mode 100644 index 0000000..e83ccdc --- /dev/null +++ b/finetune_dialogs_tool/main.py @@ -0,0 +1,17 @@ +import gradio as gr +import os + +root= os.path.dirname(os.path.abspath(__file__)) + +# create output dialogs folder if it does not exist +if not os.path.exists(root + "/output_dialogs"): + os.mkdir(root + "/output_dialogs") + +## find all json files consisting of number (0.json, 1.json .... 123.json) +#files = [f for f in os.listdir("output_dialogs") if f.endswith(".json") and f[:-5].isdigit()] +# +## get name for next file (number higher than the highest number in the folder) +#if len(files) == 0: +# next_file = "0.json" +#else: +# next_file = str(max([int(f[:-5]) for f in files]) + 1) + ".json" \ No newline at end of file