multimodalart HF staff commited on
Commit
89ba3cb
1 Parent(s): c968311

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -206,7 +206,7 @@ def start_training(
206
  dataset_folder,
207
  #token,
208
  progress = gr.Progress(track_tqdm=True),
209
- oauth_token = gr.OAuthToken
210
  ):
211
  if(oauth_token is None):
212
  raise gr.Error("You aren't logged in!")
@@ -471,7 +471,7 @@ def run_captioning(*inputs):
471
  final_captions[index] = final_caption
472
  yield final_captions
473
 
474
- def check_token(token: gr.OAuthToken):
475
  try:
476
  api = HfApi(token=token)
477
  user_data = api.whoami()
@@ -505,7 +505,7 @@ theme = gr.themes.Monochrome(
505
  text_size=gr.themes.Size(lg="18px", md="15px", sm="13px", xl="22px", xs="12px", xxl="24px", xxs="9px"),
506
  font=[gr.themes.GoogleFont('Source Sans Pro'), 'ui-sans-serif', 'system-ui', 'sans-serif'],
507
  )
508
- def swap_opacity(token: gr.OAuthProfile):
509
  if token is None:
510
  return gr.update(elem_classes=["main_unlogged"])
511
  else:
 
206
  dataset_folder,
207
  #token,
208
  progress = gr.Progress(track_tqdm=True),
209
+ oauth_token: gr.OAuthToken | None
210
  ):
211
  if(oauth_token is None):
212
  raise gr.Error("You aren't logged in!")
 
471
  final_captions[index] = final_caption
472
  yield final_captions
473
 
474
+ def check_token(token: gr.OAuthToken | None):
475
  try:
476
  api = HfApi(token=token)
477
  user_data = api.whoami()
 
505
  text_size=gr.themes.Size(lg="18px", md="15px", sm="13px", xl="22px", xs="12px", xxl="24px", xxs="9px"),
506
  font=[gr.themes.GoogleFont('Source Sans Pro'), 'ui-sans-serif', 'system-ui', 'sans-serif'],
507
  )
508
+ def swap_opacity(token: gr.OAuthToken | None):
509
  if token is None:
510
  return gr.update(elem_classes=["main_unlogged"])
511
  else: