richardr1126 commited on
Commit
5f23744
1 Parent(s): ba3b60e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -42,12 +42,11 @@ class StopOnTokens(StoppingCriteria):
42
  return True
43
  return False
44
 
45
- def bot(input_message: str, temperature=0.1, top_p=0.9, top_k=0, repetition_penalty=1.08):
46
- def bot(input_message: str, temperature=0.1, top_p=0.9, top_k=0, repetition_penalty=1.08):
47
  stop = StopOnTokens()
48
 
49
  # Format the user's input message
50
- messages = f"Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: {input_message}\n\n### Response:\n\n"
51
 
52
  input_ids = tok(messages, return_tensors="pt").input_ids
53
  input_ids = input_ids.to(m.device)
 
42
  return True
43
  return False
44
 
45
+ def bot(input_message: str, db_info="", temperature=0.1, top_p=0.9, top_k=0, repetition_penalty=1.08):
 
46
  stop = StopOnTokens()
47
 
48
  # Format the user's input message
49
+ messages = f"Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: {input_message} {db_info}\n\n### Response:\n\n"
50
 
51
  input_ids = tok(messages, return_tensors="pt").input_ids
52
  input_ids = input_ids.to(m.device)