shibing624 commited on
Commit
92db46b
1 Parent(s): 063d132

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -57,14 +57,14 @@ pip install -U textgen
57
  ```
58
 
59
  ```python
60
- from textgen import LlamaModel
61
 
62
  def generate_prompt(instruction):
63
  return f"""Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:{instruction}\n\n### Response: """
64
 
65
  ziya_model_dir = "" # ziya模型合并后的路径
66
 
67
- model = LlamaModel("llama", ziya_model_dir, peft_name="shibing624/ziya-llama-13b-medical-lora")
68
  predict_sentence = generate_prompt("一岁宝宝发烧能吃啥药?")
69
  r = model.predict([predict_sentence])
70
  print(r) # ["1、首先大多数小儿退热药中含有解热镇痛成分阿司匹林或布洛芬等,这类药品虽然副作用较少..."]
 
57
  ```
58
 
59
  ```python
60
+ from textgen import GptModel
61
 
62
  def generate_prompt(instruction):
63
  return f"""Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:{instruction}\n\n### Response: """
64
 
65
  ziya_model_dir = "" # ziya模型合并后的路径
66
 
67
+ model = GptModel("llama", ziya_model_dir, peft_name="shibing624/ziya-llama-13b-medical-lora")
68
  predict_sentence = generate_prompt("一岁宝宝发烧能吃啥药?")
69
  r = model.predict([predict_sentence])
70
  print(r) # ["1、首先大多数小儿退热药中含有解热镇痛成分阿司匹林或布洛芬等,这类药品虽然副作用较少..."]