ardaorcun commited on
Commit
8ee96b1
1 Parent(s): 1bba2cd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -9
README.md CHANGED
@@ -89,16 +89,18 @@ def format_instruction(sample):
89
 
90
  ### Response:
91
  {sample["çıktı"]}"""
 
92
 
93
- def generate_output(user_query, sys_prompt=DEFAULT_SYSTEM_PROMPT):
94
- prompt = format_instruction({"talimat": user_query, "giriş": "", "çıktı": ""})
95
- outputs = pipe(prompt,
96
- **sampling_params
97
- )
98
- return outputs[0]["generated_text"]
 
 
 
 
99
 
100
- user_query = "Türkiye'de kaç il var?"
101
- response = generate_output(user_query)
102
- print(response)```
103
 
104
 
 
89
 
90
  ### Response:
91
  {sample["çıktı"]}"""
92
+ ```
93
 
94
+ # Create Answer:
95
+
96
+ ```python
97
+ prompt = "your_prompt"
98
+ girdi = "your_entry"
99
+ instruction = f"""Sen cevap vermeyi seven yardımcı bir dil modelisin.\n### Input:\n{prompt}\n\n### Context:\n{girdi}\n\n### Response:"""
100
+ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, max_length = 2048)
101
+ result = pipe(instruction)
102
+ print(result[0]['generated_text'][len(instruction):])
103
+ ```
104
 
 
 
 
105
 
106