davidmezzetti commited on
Commit
4a14c32
1 Parent(s): 0f589c1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +35 -3
README.md CHANGED
@@ -2,8 +2,40 @@
2
  language: en
3
  widget:
4
  - text: "translate English to SQL: feel good story since yesterday"
5
- inference:
6
- parameters:
7
- max_new_tokens: 250
8
  license: apache-2.0
9
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  language: en
3
  widget:
4
  - text: "translate English to SQL: feel good story since yesterday"
 
 
 
5
  license: apache-2.0
6
  ---
7
+
8
+ # T5-small finedtuned to generate txtai SQL
9
+
10
+ [T5 small](https://huggingface.co/t5-small) fine-tuned to generate [txtai](https://github.co/neuml/txtai) SQL. This model takes natural language queries and builds txtai-compatible SQL statements.
11
+
12
+ txtai supports both natural language queries
13
+
14
+ ```
15
+ Tell me a feel good story
16
+ Show me stories about wildlife
17
+ Sports stories about hockey
18
+ ```
19
+
20
+ and SQL statements
21
+
22
+ ```
23
+ select * from txtai where similar("Tell me a feel good story") and entry >= date('now()', '-1 day')
24
+ ```
25
+
26
+ This model bridges the gap between the two and enables natural language queries with filters.
27
+
28
+ ```
29
+ Tell me a feel good story since yesterday
30
+ Show me sports stories since yesterday with team name as Red Sox
31
+ Latest news summarized
32
+ Latest news translated to fr
33
+ ```
34
+
35
+ ## Custom query syntax
36
+
37
+ This model is an example of creating a custom query syntax that can be translated into SQL txtai can understand. Any query syntax can be created. This one supports English but a similar strategy can be deployed to support other languages. Natural language can be translated to functions, query clauses, column selection and more.
38
+
39
+ ## Model training
40
+
41
+ This model was trained using scripts that can be found here: https://github.com/neuml/txtai/tree/master/models/txtsql