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