multimodalart HF staff commited on
Commit
b79f280
1 Parent(s): 6ffcf92

Update trainer.py

Browse files
Files changed (1) hide show
  1. trainer.py +2 -2
trainer.py CHANGED
@@ -20,7 +20,7 @@ from utils import save_model_card
20
  sys.path.append('Tune-A-Video')
21
 
22
  URL_TO_JOIN_MODEL_LIBRARY_ORG = 'https://huggingface.co/organizations/Tune-A-Video-library/share/YjTcaNJmKyeHFpMBioHhzBcTzCYddVErEk'
23
- ORIGINAL_SPACE_ID = 'Tune-A-Video-library/Tune-A-Video-Training-UI'
24
  SPACE_ID = os.getenv('SPACE_ID', ORIGINAL_SPACE_ID)
25
 
26
  class Trainer:
@@ -72,7 +72,7 @@ class Trainer:
72
  remove_gpu_after_training: bool,
73
  input_token: str,
74
  ) -> str:
75
- if SPACE_ID != ORIGINAL_SPACE_ID:
76
  raise gr.Error('This Space does not work on this Shared UI. Duplicate the Space and attribute a GPU')
77
  if not torch.cuda.is_available():
78
  raise gr.Error('CUDA is not available.')
 
20
  sys.path.append('Tune-A-Video')
21
 
22
  URL_TO_JOIN_MODEL_LIBRARY_ORG = 'https://huggingface.co/organizations/Tune-A-Video-library/share/YjTcaNJmKyeHFpMBioHhzBcTzCYddVErEk'
23
+ ORIGINAL_SPACE_ID = 'multimodalart/Tune-A-Video-Training-UI-poli'
24
  SPACE_ID = os.getenv('SPACE_ID', ORIGINAL_SPACE_ID)
25
 
26
  class Trainer:
 
72
  remove_gpu_after_training: bool,
73
  input_token: str,
74
  ) -> str:
75
+ if SPACE_ID == ORIGINAL_SPACE_ID:
76
  raise gr.Error('This Space does not work on this Shared UI. Duplicate the Space and attribute a GPU')
77
  if not torch.cuda.is_available():
78
  raise gr.Error('CUDA is not available.')