multimodalart HF staff commited on
Commit
b294e45
1 Parent(s): 54121e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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 | None,
140
- oauth_token: gr.OAuthToken | None,
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 | None):
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: