futranbg commited on
Commit
4a44055
1 Parent(s): cb4ae85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -4,13 +4,11 @@ from langchain.llms import HuggingFaceHub
4
 
5
  llama_repo = os.getenv('HF_MODEL_LLAMA_REPO')
6
  starchat_repo = os.getenv('HF_MODEL_STARCHAT_REPO')
7
- llamma_template = """
8
- Translation {source} document into {target}:
9
- ====================================================
10
  {query}
11
- ====================================================
12
  {target} translated document:
13
- ====================================================
14
 
15
  """
16
  starchat_template = """<|system|>I want you to act as document language translator. You do translation {source} texts in document into then you return to me the translated document AND DO NOTHING ELSE.<</SYS>>
 
4
 
5
  llama_repo = os.getenv('HF_MODEL_LLAMA_REPO')
6
  starchat_repo = os.getenv('HF_MODEL_STARCHAT_REPO')
7
+ llamma_template = """<s>[INST]<<SYS>>I want you to act as document language translator. You do translation {source} texts in document into then you return to me the translated document AND DO NOTHING ELSE.<</SYS>>[/INST]
8
+ [INST]Begin of the document:
 
9
  {query}
10
+ End of the document.[/INST]
11
  {target} translated document:
 
12
 
13
  """
14
  starchat_template = """<|system|>I want you to act as document language translator. You do translation {source} texts in document into then you return to me the translated document AND DO NOTHING ELSE.<</SYS>>