Salt commited on
Commit
719d785
·
1 Parent(s): 73b878e

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +3 -6
server.py CHANGED
@@ -63,6 +63,9 @@ classification_model = (
63
  else DEFAULT_CLASSIFICATION_MODEL
64
  )
65
 
 
 
 
66
 
67
  embedding_model = 'sentence-transformers/all-mpnet-base-v2'
68
 
@@ -85,12 +88,6 @@ classification_pipe = pipeline(
85
 
86
  print("Initializing ChromaDB")
87
 
88
- device_string = "cpu"
89
- device = torch.device(device_string)
90
- torch_dtype = torch.float32 if device_string == "cpu" else torch.float16
91
-
92
-
93
-
94
  # disable chromadb telemetry
95
  posthog.capture = lambda *args, **kwargs: None
96
  chromadb_client = chromadb.Client(Settings(anonymized_telemetry=False))
 
63
  else DEFAULT_CLASSIFICATION_MODEL
64
  )
65
 
66
+ device_string = "cpu"
67
+ device = torch.device(device_string)
68
+ torch_dtype = torch.float32 if device_string == "cpu" else torch.float16
69
 
70
  embedding_model = 'sentence-transformers/all-mpnet-base-v2'
71
 
 
88
 
89
  print("Initializing ChromaDB")
90
 
 
 
 
 
 
 
91
  # disable chromadb telemetry
92
  posthog.capture = lambda *args, **kwargs: None
93
  chromadb_client = chromadb.Client(Settings(anonymized_telemetry=False))