Spaces:
Runtime error
Runtime error
Commit
•
5220b7e
1
Parent(s):
0fa3f4b
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ from trainer import Trainer
|
|
16 |
|
17 |
TITLE = '# [Tune-A-Video](https://tuneavideo.github.io/) UI'
|
18 |
|
19 |
-
ORIGINAL_SPACE_ID = 'Tune-A-Video-library/Tune-A-Video-Training-UI'
|
20 |
SPACE_ID = os.getenv('SPACE_ID', ORIGINAL_SPACE_ID)
|
21 |
GPU_DATA = getoutput('nvidia-smi')
|
22 |
SHARED_UI_WARNING = f'''## Attention - Training doesn't work in this shared UI. You can duplicate and use it with a paid private T4 GPU.
|
@@ -61,12 +61,13 @@ pipe = InferencePipeline(HF_TOKEN)
|
|
61 |
trainer = Trainer(HF_TOKEN)
|
62 |
|
63 |
with gr.Blocks(css='style.css') as demo:
|
64 |
-
if SPACE_ID
|
65 |
show_warning(SHARED_UI_WARNING)
|
66 |
-
elif(not "T4" in GPU_DATA):
|
67 |
-
show_warning(INVALID_GPU_WARNING)
|
68 |
elif not torch.cuda.is_available():
|
69 |
show_warning(CUDA_NOT_AVAILABLE_WARNING)
|
|
|
|
|
|
|
70 |
|
71 |
gr.Markdown(TITLE)
|
72 |
with gr.Tabs():
|
|
|
16 |
|
17 |
TITLE = '# [Tune-A-Video](https://tuneavideo.github.io/) UI'
|
18 |
|
19 |
+
ORIGINAL_SPACE_ID = 'Tune-A-Video-library/Tune-A-Video-Training-UI-poli'
|
20 |
SPACE_ID = os.getenv('SPACE_ID', ORIGINAL_SPACE_ID)
|
21 |
GPU_DATA = getoutput('nvidia-smi')
|
22 |
SHARED_UI_WARNING = f'''## Attention - Training doesn't work in this shared UI. You can duplicate and use it with a paid private T4 GPU.
|
|
|
61 |
trainer = Trainer(HF_TOKEN)
|
62 |
|
63 |
with gr.Blocks(css='style.css') as demo:
|
64 |
+
if SPACE_ID == ORIGINAL_SPACE_ID:
|
65 |
show_warning(SHARED_UI_WARNING)
|
|
|
|
|
66 |
elif not torch.cuda.is_available():
|
67 |
show_warning(CUDA_NOT_AVAILABLE_WARNING)
|
68 |
+
elif(not "T4" in GPU_DATA):
|
69 |
+
show_warning(INVALID_GPU_WARNING)
|
70 |
+
|
71 |
|
72 |
gr.Markdown(TITLE)
|
73 |
with gr.Tabs():
|