Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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)
|