added finetune dialogs creation tool that's still work in progress
This commit is contained in:
parent
47b38e91e7
commit
e6da26dc45
17
finetune_dialogs_tool/main.py
Normal file
17
finetune_dialogs_tool/main.py
Normal file
@ -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"
|
Loading…
Reference in New Issue
Block a user