ansumanpandey commited on
Commit
b44bdcb
1 Parent(s): bdb0145

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -16
README.md CHANGED
@@ -30,20 +30,6 @@ This model is intended for the automatic generation of SQL queries from descript
30
  This model can be used with the Hugging Face Transformers library. Here is a quick example:
31
 
32
  ***************************
33
-
34
- from transformers import AutoTokenizer, AutoModelForCausalLM
35
-
36
- tokenizer = AutoTokenizer.from_pretrained("ansumanpandey/codgen-finetuned-SQLQueryGeneration")
37
- model = AutoModelForCausalLM.from_pretrained("ansumanpandey/codgen-finetuned-SQLQueryGeneration")
38
-
39
- def get_sql(query):
40
- input_text = "Write a SQL query to %s </s>" % query
41
- features = tokenizer([input_text], return_tensors='pt')
42
-
43
- output = model.generate(input_ids=features['input_ids'],
44
- attention_mask=features['attention_mask'],
45
- max_new_tokens=70)
46
- sql_query= tokenizer.decode(output[0])
47
- return sql_query
48
-
49
  ***************************
 
30
  This model can be used with the Hugging Face Transformers library. Here is a quick example:
31
 
32
  ***************************
33
+ The link:
34
+ https://huggingface.co/ansumanpandey/codgen-finetuned-SQLQueryGeneration/blob/main/The%20SQL%20Generation%20Code
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  ***************************