artificialguybr commited on
Commit
e586fb9
1 Parent(s): bdb430b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,9 +6,9 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
6
  from transformers.generation import GenerationConfig
7
 
8
  # Initialize model and tokenizer
9
- tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-7B-Chat", trust_remote_code=True)
10
- model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-7B-Chat", device_map="auto", trust_remote_code=True).eval()
11
- model.generation_config = GenerationConfig.from_pretrained("Qwen/Qwen-7B-Chat", trust_remote_code=True)
12
 
13
  # Postprocess function
14
  def postprocess(self, y):
 
6
  from transformers.generation import GenerationConfig
7
 
8
  # Initialize model and tokenizer
9
+ tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-14B-Chat", trust_remote_code=True)
10
+ model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-14B-Chat", device_map="auto", trust_remote_code=True).eval()
11
+ model.generation_config = GenerationConfig.from_pretrained("Qwen/Qwen-14B-Chat", trust_remote_code=True)
12
 
13
  # Postprocess function
14
  def postprocess(self, y):