NightRaven109 commited on
Commit
a6a82ee
·
verified ·
1 Parent(s): 3dffb99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -19,6 +19,9 @@ import transformers
19
  transformers.utils.move_cache()
20
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
21
 
 
 
 
22
  def infer(path_input, seed):
23
  name_base, name_ext = os.path.splitext(os.path.basename(path_input))
24
  output_g, output_d = lotus(path_input, 'depth', seed, device)
 
19
  transformers.utils.move_cache()
20
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
21
 
22
+ if "HF_TOKEN_LOGIN" in os.environ:
23
+ login(token=os.environ["HF_TOKEN_LOGIN"])
24
+
25
  def infer(path_input, seed):
26
  name_base, name_ext = os.path.splitext(os.path.basename(path_input))
27
  output_g, output_d = lotus(path_input, 'depth', seed, device)