DonImages commited on
Commit
33b1db2
·
verified ·
1 Parent(s): e12b6d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -95,6 +95,10 @@ def train_lora(image_folder, metadata):
95
  if batch_idx % 10 == 0:
96
  print(f"Batch {batch_idx}, Loss: {loss.item()}")
97
 
 
 
 
 
98
  print("LoRA training completed.")
99
 
100
  # Gradio App
 
95
  if batch_idx % 10 == 0:
96
  print(f"Batch {batch_idx}, Loss: {loss.item()}")
97
 
98
+ # Save the trained model
99
+ torch.save(model.state_dict(), "lora_model.pth")
100
+ print("Model saved as lora_model.pth")
101
+
102
  print("LoRA training completed.")
103
 
104
  # Gradio App