Spaces:
Sleeping
Sleeping
Update agents/verification_agent.py
Browse files
agents/verification_agent.py
CHANGED
|
@@ -2,6 +2,7 @@ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
|
| 2 |
import torch
|
| 3 |
from typing import Dict, List
|
| 4 |
from langchain_core.documents.base import Document
|
|
|
|
| 5 |
|
| 6 |
class VerificationAgent:
|
| 7 |
def __init__(self):
|
|
@@ -11,7 +12,7 @@ class VerificationAgent:
|
|
| 11 |
print("Initializing RelevanceChecker with lightweight Hugging Face model...")
|
| 12 |
|
| 13 |
# Use a smaller, CPU-friendly model by default
|
| 14 |
-
model_name = "
|
| 15 |
|
| 16 |
self.device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 17 |
|
|
|
|
| 2 |
import torch
|
| 3 |
from typing import Dict, List
|
| 4 |
from langchain_core.documents.base import Document
|
| 5 |
+
from config.settings import settings
|
| 6 |
|
| 7 |
class VerificationAgent:
|
| 8 |
def __init__(self):
|
|
|
|
| 12 |
print("Initializing RelevanceChecker with lightweight Hugging Face model...")
|
| 13 |
|
| 14 |
# Use a smaller, CPU-friendly model by default
|
| 15 |
+
model_name = getattr(settings, "HF_MODEL_NAME")
|
| 16 |
|
| 17 |
self.device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 18 |
|