Spaces:
Configuration error
Configuration error
update
Browse files
app.py
CHANGED
|
@@ -43,8 +43,9 @@ def monkeypatching(alpha, in_prompt, wt): #, prompt, pipe): finetuned_lora_weigh
|
|
| 43 |
|
| 44 |
def accelerate_train_lora(steps, images):
|
| 45 |
print("*********** inside accelerate_train_lora ***********")
|
|
|
|
| 46 |
for file in images:
|
| 47 |
-
shutil.copy( file, './data_example')
|
| 48 |
#subprocess.Popen(f'accelerate launch {"./train_lora_dreambooth.py"} \
|
| 49 |
os.system( f'accelerate launch {"./train_lora_dreambooth.py"} \
|
| 50 |
--pretrained_model_name_or_path={MODEL_NAME} \
|
|
|
|
| 43 |
|
| 44 |
def accelerate_train_lora(steps, images):
|
| 45 |
print("*********** inside accelerate_train_lora ***********")
|
| 46 |
+
# path can be retrieved by file_obj.name and original filename can be retrieved with file_obj.orig_name
|
| 47 |
for file in images:
|
| 48 |
+
shutil.copy( f'{file.name}/{file.orig_name}', './data_example')
|
| 49 |
#subprocess.Popen(f'accelerate launch {"./train_lora_dreambooth.py"} \
|
| 50 |
os.system( f'accelerate launch {"./train_lora_dreambooth.py"} \
|
| 51 |
--pretrained_model_name_or_path={MODEL_NAME} \
|