omeryentur commited on
Commit
a696ee1
·
verified ·
1 Parent(s): 8094a28

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -23,10 +23,10 @@ def generate_sql_query(text_input_schema:str,text_input_question: str):
23
 
24
  try:
25
  prompt = f"""<|system|>
26
- {table_info}
27
 
28
  <|user|>
29
- {question}
30
 
31
  <|sql|>"""
32
 
@@ -37,11 +37,8 @@ def generate_sql_query(text_input_schema:str,text_input_question: str):
37
  stop=["<end_of_turn>"]
38
  )
39
 
40
- generated_pattern = completion['choices'][0]['text'].strip()
41
- result = parse_log_with_grok(text, generated_pattern)
42
- time.sleep(0.5)
43
-
44
- return result
45
 
46
  except Exception as e:
47
  return {"error": e}
 
23
 
24
  try:
25
  prompt = f"""<|system|>
26
+ {text_input_schema}
27
 
28
  <|user|>
29
+ {text_input_question}
30
 
31
  <|sql|>"""
32
 
 
37
  stop=["<end_of_turn>"]
38
  )
39
 
40
+ generated_pattern = completion['choices'][0]['text'].strip()
41
+ return generated_pattern
 
 
 
42
 
43
  except Exception as e:
44
  return {"error": e}