test4good commited on
Commit
503c9af
1 Parent(s): b1047fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -20,11 +20,14 @@ SIMILARITY_THRESHOLD = 0.3 # fallback threshold if similarity is too low
20
 
21
  # Translation pipelines
22
  # Translation to Russian (for queries not in Russian)
23
- translate_to_ru = pipeline("translation", model="Helsinki-NLP/opus-mt-multi-en-ru")
 
 
24
 
25
  # RU->EN for English queries
26
  translate_ru_to_en = pipeline("translation", model="Helsinki-NLP/opus-mt-ru-en")
27
 
 
28
  # Russian Language Model for QA
29
  llm = HuggingFaceHub(repo_id="DeepPavlov/rubert-base-cased", model_kwargs={"temperature": 0})
30
  qa_chain = load_qa_chain(llm, chain_type="stuff")
 
20
 
21
  # Translation pipelines
22
  # Translation to Russian (for queries not in Russian)
23
+ # translate_to_ru = pipeline("translation", model="Helsinki-NLP/opus-mt-multi-en-ru")
24
+ translate_to_ru = pipeline("translation", model="Helsinki-NLP/opus-mt-en-ru")
25
+
26
 
27
  # RU->EN for English queries
28
  translate_ru_to_en = pipeline("translation", model="Helsinki-NLP/opus-mt-ru-en")
29
 
30
+
31
  # Russian Language Model for QA
32
  llm = HuggingFaceHub(repo_id="DeepPavlov/rubert-base-cased", model_kwargs={"temperature": 0})
33
  qa_chain = load_qa_chain(llm, chain_type="stuff")