Synced repo using 'sync_with_huggingface' Github Action
Browse files- Dockerfile +1 -1
- app.py +2 -2
Dockerfile
CHANGED
|
@@ -46,7 +46,7 @@ COPY ./utils /app/utils
|
|
| 46 |
# COPY ./static /app/static
|
| 47 |
# COPY ./templates /app/templates
|
| 48 |
COPY ./app.py /app/app.py
|
| 49 |
-
|
| 50 |
|
| 51 |
WORKDIR /app
|
| 52 |
|
|
|
|
| 46 |
# COPY ./static /app/static
|
| 47 |
# COPY ./templates /app/templates
|
| 48 |
COPY ./app.py /app/app.py
|
| 49 |
+
COPY ./download.py /app/download.py
|
| 50 |
|
| 51 |
WORKDIR /app
|
| 52 |
|
app.py
CHANGED
|
@@ -70,9 +70,9 @@ print_arguments(args)
|
|
| 70 |
assert os.path.exists(args.model_path), f"{args.model_path}"
|
| 71 |
#
|
| 72 |
if args.use_gpu:
|
| 73 |
-
model = SentenceTransformer(args.model_path, device="cuda", compute_type="float16"
|
| 74 |
else:
|
| 75 |
-
model = SentenceTransformer(args.model_path, device='cpu'
|
| 76 |
|
| 77 |
|
| 78 |
app = FastAPI(title="embedding Inference")
|
|
|
|
| 70 |
assert os.path.exists(args.model_path), f"{args.model_path}"
|
| 71 |
#
|
| 72 |
if args.use_gpu:
|
| 73 |
+
model = SentenceTransformer(args.model_path, device="cuda", compute_type="float16")
|
| 74 |
else:
|
| 75 |
+
model = SentenceTransformer(args.model_path, device='cpu')
|
| 76 |
|
| 77 |
|
| 78 |
app = FastAPI(title="embedding Inference")
|