mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
Training: fix .txt files now showing in dropdowns
This commit is contained in:
parent
af3d25a503
commit
5c0559da69
@ -119,7 +119,7 @@ def get_available_loras():
|
|||||||
def get_datasets(path: str, ext: str):
|
def get_datasets(path: str, ext: str):
|
||||||
# include subdirectories for raw txt files to allow training from a subdirectory of txt files
|
# include subdirectories for raw txt files to allow training from a subdirectory of txt files
|
||||||
if ext == "txt":
|
if ext == "txt":
|
||||||
return ['None'] + sorted(set([k.stem for k in list(Path(path).glob('txt')) + list(Path(path).glob('*/')) if k.stem != 'put-trainer-datasets-here']), key=natural_keys)
|
return ['None'] + sorted(set([k.stem for k in list(Path(path).glob('*.txt')) + list(Path(path).glob('*/')) if k.stem != 'put-trainer-datasets-here']), key=natural_keys)
|
||||||
|
|
||||||
return ['None'] + sorted(set([k.stem for k in Path(path).glob(f'*.{ext}') if k.stem != 'put-trainer-datasets-here']), key=natural_keys)
|
return ['None'] + sorted(set([k.stem for k in Path(path).glob(f'*.{ext}') if k.stem != 'put-trainer-datasets-here']), key=natural_keys)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user