Update README.md
Browse files
README.md
CHANGED
|
@@ -65,4 +65,23 @@ inputs = tokenizer(
|
|
| 65 |
|
| 66 |
outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = True)
|
| 67 |
tokenizer.batch_decode(outputs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
```
|
|
|
|
| 65 |
|
| 66 |
outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = True)
|
| 67 |
tokenizer.batch_decode(outputs)
|
| 68 |
+
|
| 69 |
+
#response :
|
| 70 |
+
#['You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables.
|
| 71 |
+
#\n\nYou must output the SQL query that answers the question.\n\n### Instruction:\nName the result/games for 54741\n\n### Input:\nCREATE TABLE table_21436373_11 (result_games VARCHAR, attendance VARCHAR)
|
| 72 |
+
#\n\n### Response:\nSELECT result_games FROM table_21436373_11 WHERE attendance = "54741"<|end_of_text|>']
|
| 73 |
+
|
| 74 |
+
from transformers import TextStreamer
|
| 75 |
+
text_streamer = TextStreamer(tokenizer)
|
| 76 |
+
_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 128)
|
| 77 |
+
|
| 78 |
+
#response
|
| 79 |
+
#You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables.
|
| 80 |
+
#You must output the SQL query that answers the question.
|
| 81 |
+
### Instruction:
|
| 82 |
+
#Name the result/games for 54741
|
| 83 |
+
### Input:
|
| 84 |
+
#CREATE TABLE table_21436373_11 (result_games VARCHAR, attendance VARCHAR)
|
| 85 |
+
## Response:
|
| 86 |
+
#SELECT result_games FROM table_21436373_11 WHERE attendance = "54741"<|end_of_text|>
|
| 87 |
```
|