Priyanshu05 commited on
Commit
10dc432
Β·
verified Β·
1 Parent(s): 871b7a4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +39 -36
README.md CHANGED
@@ -1,36 +1,39 @@
1
- ---
2
- language: en
3
- datasets: custom
4
- tags:
5
- - text-to-sql
6
- - t5
7
- - natural-language-processing
8
- - transformers
9
- - huggingface
10
- license: apache-2.0
11
- ---
12
-
13
- # πŸ” Text-to-SQL with T5 (`t5-base`)
14
-
15
- This model is a fine-tuned version of [`t5-base`](https://huggingface.co/t5-base) on a custom **Text-to-SQL** dataset. It translates natural language questions into corresponding SQL queries.
16
-
17
- ## πŸ“Œ Model Details
18
-
19
- - **Base model:** [t5-base](https://huggingface.co/t5-base)
20
- - **Task:** Natural Language to SQL (text-to-SQL)
21
- - **Dataset:** Small custom dataset (~10–15 examples) of questions and SQL queries
22
- - **Language:** English
23
- - **Fine-tuned by:** [Priyanshu05](https://huggingface.co/Priyanshu05)
24
-
25
- ## 🧠 Example
26
-
27
- ```python
28
- from transformers import T5Tokenizer, T5ForConditionalGeneration
29
-
30
- model = T5ForConditionalGeneration.from_pretrained("Priyanshu05/text-to-sql-t5")
31
- tokenizer = T5Tokenizer.from_pretrained("Priyanshu05/text-to-sql-t5")
32
-
33
- question = "translate natural language to SQL: show all customers"
34
- inputs = tokenizer(question, return_tensors="pt")
35
- output = model.generate(**inputs)
36
- print(tokenizer.decode(output[0], skip_special_tokens=True))
 
 
 
 
1
+ ---
2
+ language: en
3
+ datasets: custom
4
+ tags:
5
+ - text-to-sql
6
+ - t5
7
+ - natural-language-processing
8
+ - transformers
9
+ - huggingface
10
+ license: apache-2.0
11
+ ---
12
+
13
+ # πŸ” Text-to-SQL with T5 (`t5-base`)
14
+
15
+ This model is a fine-tuned version of [`t5-base`](https://huggingface.co/t5-base) on a custom **Text-to-SQL** dataset. It translates natural language questions into corresponding SQL queries.
16
+
17
+ ## πŸ“Œ Model Details
18
+
19
+ - **Base model:** [t5-base](https://huggingface.co/t5-base)
20
+ - **Task:** Natural Language to SQL (text-to-SQL)
21
+ - **Dataset:** Small custom dataset (~10–15 examples) of questions and SQL queries
22
+ - **Language:** English
23
+ - **Fine-tuned by:** [Priyanshu05](https://huggingface.co/Priyanshu05)
24
+
25
+ ## 🧠 Example
26
+
27
+ ```python
28
+ from transformers import T5Tokenizer, T5ForConditionalGeneration
29
+
30
+ model = T5ForConditionalGeneration.from_pretrained("Priyanshu05/text-to-sql-t5")
31
+ tokenizer = T5Tokenizer.from_pretrained("Priyanshu05/text-to-sql-t5")
32
+
33
+ question = "translate natural language to SQL: show all customers"
34
+ inputs = tokenizer(question, return_tensors="pt")
35
+ output = model.generate(**inputs)
36
+ print(tokenizer.decode(output[0], skip_special_tokens=True))
37
+ ```
38
+ ## License
39
+ This project is licensed under the Apache-2.0 License.