h3110Fr13nd commited on
Commit
35d79f2
·
1 Parent(s): f324681

dockerfile

Browse files
Files changed (1) hide show
  1. ddl_query_generator.py +3 -3
ddl_query_generator.py CHANGED
@@ -56,6 +56,7 @@ def run_sql_query(csv_files, sql_query):
56
 
57
 
58
  history = []
 
59
 
60
  @app.route('/', methods=['GET', 'POST'])
61
  def ddl_query():
@@ -67,9 +68,9 @@ def ddl_query():
67
  if user_question:
68
  output = get_llm_response(user_question, ddl)
69
  # Insert the new history item at the beginning of the list
70
- history.insert(0, {'query': user_question, 'response': output})
71
 
72
- return render_template('index.html', history=history, ddl=ddl)
73
 
74
 
75
  @app.route('/dbms_query', methods=['GET', 'POST'])
@@ -97,4 +98,3 @@ def index():
97
 
98
  if __name__ == '__main__':
99
  app.run(debug=True, port = 7860, host = '0.0.0.0')
100
-
 
56
 
57
 
58
  history = []
59
+ history_dll = []
60
 
61
  @app.route('/', methods=['GET', 'POST'])
62
  def ddl_query():
 
68
  if user_question:
69
  output = get_llm_response(user_question, ddl)
70
  # Insert the new history item at the beginning of the list
71
+ history_dll.insert(0, {'query': user_question, 'response': output})
72
 
73
+ return render_template('index.html', history=history_dll, ddl=ddl)
74
 
75
 
76
  @app.route('/dbms_query', methods=['GET', 'POST'])
 
98
 
99
  if __name__ == '__main__':
100
  app.run(debug=True, port = 7860, host = '0.0.0.0')