futranbg commited on
Commit
a60ea1d
·
1 Parent(s): ef6eea4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
3
  from langchain.llms import HuggingFaceHub
4
 
5
  model_repo = os.getenv('HF_MODEL_REPO')
6
- template = """[INST]<<SYS>>I want you to be a translator. You do translate {source} texts in the context into {target} then you return to me the whole translated context AND DO NOTHING ELSE.<</SYS>>
7
  Begin of the context:
8
  {query}
9
  End of the context.[/INST]
@@ -15,6 +15,7 @@ model_kwargs={
15
  "max_new_tokens":2048,
16
  "temperature": 0.01,
17
  "truncate": 4096,
 
18
  "stop" : ["</s>","<|endoftext|>","<|end|>"],
19
  }
20
 
 
3
  from langchain.llms import HuggingFaceHub
4
 
5
  model_repo = os.getenv('HF_MODEL_REPO')
6
+ template = """[INST]<<SYS>>I want you to act as language translator. You do translate {source} texts in the context into {target} then you return to me the whole translated context AND NOTHING ELSE.<</SYS>>
7
  Begin of the context:
8
  {query}
9
  End of the context.[/INST]
 
15
  "max_new_tokens":2048,
16
  "temperature": 0.01,
17
  "truncate": 4096,
18
+ "seed" : 256,
19
  "stop" : ["</s>","<|endoftext|>","<|end|>"],
20
  }
21