Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import os
|
| 2 |
import subprocess
|
| 3 |
-
|
| 4 |
is_spaces = True if os.environ.get("SPACE_ID") else False
|
| 5 |
|
| 6 |
if is_spaces:
|
|
@@ -136,8 +136,8 @@ def run_captioning(images, concept_sentence, *captions):
|
|
| 136 |
|
| 137 |
|
| 138 |
def start_training(
|
| 139 |
-
profile: gr.OAuthProfile
|
| 140 |
-
oauth_token: gr.OAuthToken
|
| 141 |
lora_name,
|
| 142 |
concept_sentence,
|
| 143 |
steps,
|
|
@@ -229,7 +229,7 @@ css = """
|
|
| 229 |
.tabitem{border: 0px}
|
| 230 |
"""
|
| 231 |
|
| 232 |
-
def swap_visibilty(profile: gr.OAuthProfile
|
| 233 |
print(profile)
|
| 234 |
if is_spaces:
|
| 235 |
if profile is None:
|
|
|
|
| 1 |
import os
|
| 2 |
import subprocess
|
| 3 |
+
from typing import Union
|
| 4 |
is_spaces = True if os.environ.get("SPACE_ID") else False
|
| 5 |
|
| 6 |
if is_spaces:
|
|
|
|
| 136 |
|
| 137 |
|
| 138 |
def start_training(
|
| 139 |
+
profile: Union[gr.OAuthProfile, None],
|
| 140 |
+
oauth_token: Union[gr.OAuthToken, None],
|
| 141 |
lora_name,
|
| 142 |
concept_sentence,
|
| 143 |
steps,
|
|
|
|
| 229 |
.tabitem{border: 0px}
|
| 230 |
"""
|
| 231 |
|
| 232 |
+
def swap_visibilty(profile: Union[gr.OAuthProfile, None]):
|
| 233 |
print(profile)
|
| 234 |
if is_spaces:
|
| 235 |
if profile is None:
|