Update README.md
Browse files
README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
---
|
| 2 |
-
language:
|
|
|
|
| 3 |
tags:
|
| 4 |
- text2sql
|
| 5 |
- causal-lm
|
|
@@ -7,6 +8,9 @@ tags:
|
|
| 7 |
- safetensors
|
| 8 |
license: mit
|
| 9 |
pipeline_tag: text-generation
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
|
|
@@ -20,7 +24,7 @@ This is a fine-tuned **Microsoft Phi-3** model specialized for **Text-to-SQL** g
|
|
| 20 |
```python
|
| 21 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 22 |
|
| 23 |
-
repo_id = "
|
| 24 |
tokenizer = AutoTokenizer.from_pretrained(repo_id)
|
| 25 |
model = AutoModelForCausalLM.from_pretrained(repo_id, torch_dtype="auto", device_map="auto")
|
| 26 |
|
|
@@ -29,4 +33,4 @@ inputs = tokenizer(question, return_tensors="pt").to(model.device)
|
|
| 29 |
outputs = model.generate(**inputs, max_new_tokens=128)
|
| 30 |
|
| 31 |
sql_query = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 32 |
-
print(sql_query)
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
tags:
|
| 5 |
- text2sql
|
| 6 |
- causal-lm
|
|
|
|
| 8 |
- safetensors
|
| 9 |
license: mit
|
| 10 |
pipeline_tag: text-generation
|
| 11 |
+
base_model:
|
| 12 |
+
- microsoft/Phi-3-mini-4k-instruct
|
| 13 |
+
library_name: transformers
|
| 14 |
---
|
| 15 |
|
| 16 |
|
|
|
|
| 24 |
```python
|
| 25 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 26 |
|
| 27 |
+
repo_id = "bhavika67/text2sql"
|
| 28 |
tokenizer = AutoTokenizer.from_pretrained(repo_id)
|
| 29 |
model = AutoModelForCausalLM.from_pretrained(repo_id, torch_dtype="auto", device_map="auto")
|
| 30 |
|
|
|
|
| 33 |
outputs = model.generate(**inputs, max_new_tokens=128)
|
| 34 |
|
| 35 |
sql_query = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 36 |
+
print(sql_query)
|