Spaces:
Runtime error
Runtime error
Commit
·
bc7f05e
1
Parent(s):
37822b0
Update app.py
Browse files
app.py
CHANGED
@@ -56,10 +56,8 @@ trainer = Trainer(HF_TOKEN)
|
|
56 |
with gr.Blocks(css='style.css') as demo:
|
57 |
if os.getenv('IS_SHARED_UI'):
|
58 |
show_warning(SHARED_UI_WARNING)
|
59 |
-
|
60 |
show_warning(CUDA_NOT_AVAILABLE_WARNING)
|
61 |
-
if not HF_TOKEN:
|
62 |
-
show_warning(HF_TOKEN_NOT_SPECIFIED_WARNING)
|
63 |
|
64 |
gr.Markdown(TITLE)
|
65 |
with gr.Tabs():
|
@@ -72,5 +70,8 @@ with gr.Blocks(css='style.css') as demo:
|
|
72 |
- You can use this tab to upload models later if you choose not to upload models in training time or if upload in training time failed.
|
73 |
''')
|
74 |
create_upload_demo(HF_TOKEN)
|
|
|
|
|
|
|
75 |
|
76 |
demo.queue(max_size=1).launch(share=False)
|
|
|
56 |
with gr.Blocks(css='style.css') as demo:
|
57 |
if os.getenv('IS_SHARED_UI'):
|
58 |
show_warning(SHARED_UI_WARNING)
|
59 |
+
elif not torch.cuda.is_available():
|
60 |
show_warning(CUDA_NOT_AVAILABLE_WARNING)
|
|
|
|
|
61 |
|
62 |
gr.Markdown(TITLE)
|
63 |
with gr.Tabs():
|
|
|
70 |
- You can use this tab to upload models later if you choose not to upload models in training time or if upload in training time failed.
|
71 |
''')
|
72 |
create_upload_demo(HF_TOKEN)
|
73 |
+
|
74 |
+
if not HF_TOKEN:
|
75 |
+
show_warning(HF_TOKEN_NOT_SPECIFIED_WARNING)
|
76 |
|
77 |
demo.queue(max_size=1).launch(share=False)
|