Kevin Fink commited on
Commit
25c5a89
·
1 Parent(s): 297c33f
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -29,6 +29,7 @@ model.save_pretrained(model_save_path)
29
 
30
  def fine_tune_model(model, dataset_name, hub_id, api_key, num_epochs, batch_size, lr, grad):
31
  try:
 
32
  torch.nn.CrossEntropyLoss()
33
  metric = evaluate.load("rouge", cache_dir='/data/cache')
34
  def compute_metrics(eval_preds):
 
29
 
30
  def fine_tune_model(model, dataset_name, hub_id, api_key, num_epochs, batch_size, lr, grad):
31
  try:
32
+ torch.cuda.empty_cache()
33
  torch.nn.CrossEntropyLoss()
34
  metric = evaluate.load("rouge", cache_dir='/data/cache')
35
  def compute_metrics(eval_preds):