Skip to content

Commit

Permalink
Removes code specifying the gpu device
Browse files Browse the repository at this point in the history
  • Loading branch information
CollectiveUnicorn committed Aug 27, 2024
1 parent d949f74 commit 03186f1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/text-embeddings/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@
serve,
)

GPU_ENABLED = (
False if os.environ.get("GPU_ENABLED", "False").lower() != "true" else True
)

model_dir = os.environ.get("LFAI_MODEL_PATH", ".model")
model = INSTRUCTOR(model_dir, device="cuda" if GPU_ENABLED else "cpu")
model = INSTRUCTOR(model_dir)


class InstructorEmbedding:
Expand Down

0 comments on commit 03186f1

Please sign in to comment.