hysts HF staff commited on
Commit
19d0a28
1 Parent(s): 3aac014
Files changed (1) hide show
  1. trainer.py +4 -5
trainer.py CHANGED
@@ -8,7 +8,6 @@ import shutil
8
  import subprocess
9
  import sys
10
 
11
- import gradio as gr
12
  import slugify
13
  import torch
14
  from huggingface_hub import HfApi
@@ -64,13 +63,13 @@ class Trainer:
64
  hf_token: str,
65
  ) -> None:
66
  if not torch.cuda.is_available():
67
- raise gr.Error('CUDA is not available.')
68
  if training_video is None:
69
- raise gr.Error('You need to upload a video.')
70
  if not training_prompt:
71
- raise gr.Error('The training prompt is missing.')
72
  if not validation_prompt:
73
- raise gr.Error('The validation prompt is missing.')
74
 
75
  resolution = int(resolution_s)
76
 
 
8
  import subprocess
9
  import sys
10
 
 
11
  import slugify
12
  import torch
13
  from huggingface_hub import HfApi
 
63
  hf_token: str,
64
  ) -> None:
65
  if not torch.cuda.is_available():
66
+ raise RuntimeError('CUDA is not available.')
67
  if training_video is None:
68
+ raise ValueError('You need to upload a video.')
69
  if not training_prompt:
70
+ raise ValueError('The training prompt is missing.')
71
  if not validation_prompt:
72
+ raise ValueError('The validation prompt is missing.')
73
 
74
  resolution = int(resolution_s)
75