Update README.md
Browse files
README.md
CHANGED
@@ -89,16 +89,18 @@ def format_instruction(sample):
|
|
89 |
|
90 |
### Response:
|
91 |
{sample["çıktı"]}"""
|
|
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
|
|
|
|
|
|
|
|
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 |
|