Synced repo using 'sync_with_huggingface' Github Action
Browse files
app.py
CHANGED
|
@@ -80,9 +80,9 @@ print_arguments(args)
|
|
| 80 |
# assert os.path.exists(args.model_path), f"{args.model_path}"
|
| 81 |
#
|
| 82 |
if args.use_gpu:
|
| 83 |
-
model = SentenceTransformer(args.model_path, device="cuda", compute_type="float16")
|
| 84 |
else:
|
| 85 |
-
model = SentenceTransformer(args.model_path, device='cpu')
|
| 86 |
|
| 87 |
|
| 88 |
#
|
|
|
|
| 80 |
# assert os.path.exists(args.model_path), f"{args.model_path}"
|
| 81 |
#
|
| 82 |
if args.use_gpu:
|
| 83 |
+
model = SentenceTransformer(args.model_path, device="cuda", compute_type="float16", cache_folder=".")
|
| 84 |
else:
|
| 85 |
+
model = SentenceTransformer(args.model_path, device='cpu', cache_folder=".")
|
| 86 |
|
| 87 |
|
| 88 |
#
|