Spaces:
Running
on
A10G
Running
on
A10G
Update finetune.py
Browse files- finetune.py +4 -0
finetune.py
CHANGED
|
@@ -126,6 +126,10 @@ class CustomFinetuneModel(ESPnetS2TModel):
|
|
| 126 |
|
| 127 |
def finetune_model(lang, task, tempdir_path, log_every, max_epoch, scheduler, warmup_steps, optimizer, learning_rate, weight_decay):
|
| 128 |
"""Main function for finetuning the model."""
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
print("Start loading dataset...")
|
| 130 |
if len(tempdir_path) == 0:
|
| 131 |
raise gr.Error("Please upload a zip file first.")
|
|
|
|
| 126 |
|
| 127 |
def finetune_model(lang, task, tempdir_path, log_every, max_epoch, scheduler, warmup_steps, optimizer, learning_rate, weight_decay):
|
| 128 |
"""Main function for finetuning the model."""
|
| 129 |
+
|
| 130 |
+
if not os.path.exists(f"{tempdir_path}/ref.txt"):
|
| 131 |
+
raise gr.Error("Please run Baseline first.")
|
| 132 |
+
|
| 133 |
print("Start loading dataset...")
|
| 134 |
if len(tempdir_path) == 0:
|
| 135 |
raise gr.Error("Please upload a zip file first.")
|