ysharma HF staff commited on
Commit
409a131
·
1 Parent(s): edd39e5

update examples

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -61,7 +61,11 @@ def accelerate_train_lora(steps, images):
61
  --max_train_steps={int(steps)}') #,shell=True) #30000
62
  print("*********** completing accelerate_train_lora ***********")
63
  #lora_trained_weights = "./output_example/lora_weight.pt"
64
- return f"{OUTPUT_DIR}/lora_weight.pt"
 
 
 
 
65
 
66
  with gr.Blocks() as demo:
67
  gr.Markdown("""<h1><center>LORA - Low-rank Adaptation for Fast Text-to-Image Diffusion Fine-tuning</center></h1>
 
61
  --max_train_steps={int(steps)}') #,shell=True) #30000
62
  print("*********** completing accelerate_train_lora ***********")
63
  #lora_trained_weights = "./output_example/lora_weight.pt"
64
+ for file in os.listdir(f"{OUTPUT_DIR}"):
65
+ if file.endswith(".pt"):
66
+ print(os.path.join(f"{OUTPUT_DIR}", file))
67
+ return file
68
+ #return f"{OUTPUT_DIR}/*.pt"
69
 
70
  with gr.Blocks() as demo:
71
  gr.Markdown("""<h1><center>LORA - Low-rank Adaptation for Fast Text-to-Image Diffusion Fine-tuning</center></h1>