Update app.py
Browse files
app.py
CHANGED
|
@@ -21,12 +21,6 @@ from utils.lang_utils import detect_language, translate_text
|
|
| 21 |
# Import LangChain components
|
| 22 |
from langchain_groq import ChatGroq
|
| 23 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
| 24 |
-
|
| 25 |
-
self.embeddings = HuggingFaceEmbeddings(
|
| 26 |
-
model_name="sentence-transformers/all-MiniLM-L6-v2",
|
| 27 |
-
model_kwargs={"device": "cpu"}
|
| 28 |
-
)
|
| 29 |
-
|
| 30 |
from langdetect import detect
|
| 31 |
from deep_translator import GoogleTranslator
|
| 32 |
def detect_and_translate_to_english(text: str) -> str:
|
|
|
|
| 21 |
# Import LangChain components
|
| 22 |
from langchain_groq import ChatGroq
|
| 23 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
from langdetect import detect
|
| 25 |
from deep_translator import GoogleTranslator
|
| 26 |
def detect_and_translate_to_english(text: str) -> str:
|