vagmi commited on
Commit
b33a97c
1 Parent(s): 3ec184a

Update readme with an example.

Browse files
Files changed (1) hide show
  1. README.md +12 -0
README.md CHANGED
@@ -43,6 +43,18 @@ def load_model(model_name):
43
  return model, tokenizer
44
 
45
  model, tokenizer = load_model('vagmi/squeal')
 
 
 
 
 
 
 
 
 
 
 
 
46
  ```
47
 
48
  ## How I built it?
 
43
  return model, tokenizer
44
 
45
  model, tokenizer = load_model('vagmi/squeal')
46
+
47
+ prompt = "<s>[INST] Output SQL for the given table structure \n \
48
+ CREATE TABLE votes (contestant_number VARCHAR, num_votes int); \
49
+ CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR); \
50
+ What is the contestant number and name of the contestant who got least votes?[/INST]"
51
+ pipe = pipeline(task="text-generation",
52
+ model=model,
53
+ tokenizer=tokenizer,
54
+ max_length=200,
55
+ device_map='auto', )
56
+ result = pipe(prompt)
57
+ print(result[0]['generated_text'][len(prompt):-1])
58
  ```
59
 
60
  ## How I built it?