Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,7 +38,7 @@ quantization_config = BitsAndBytesConfig(load_in_8bit=True)
|
|
| 38 |
model = AutoModelForCausalLM.from_pretrained(model_name, token=api_token, quantization_config=quantization_config, torch_dtype="auto")
|
| 39 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 40 |
model = model.eval()
|
| 41 |
-
model.to(device)
|
| 42 |
embedding_model = HuggingFaceBgeEmbeddings(
|
| 43 |
model_name="BAAI/bge-large-en-v1.5",
|
| 44 |
model_kwargs={"device": str(device)},
|
|
|
|
| 38 |
model = AutoModelForCausalLM.from_pretrained(model_name, token=api_token, quantization_config=quantization_config, torch_dtype="auto")
|
| 39 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 40 |
model = model.eval()
|
| 41 |
+
# model.to(device)
|
| 42 |
embedding_model = HuggingFaceBgeEmbeddings(
|
| 43 |
model_name="BAAI/bge-large-en-v1.5",
|
| 44 |
model_kwargs={"device": str(device)},
|