openai-sql/webgui/app.py
2023-06-15 08:41:04 +02:00

18 lines
456 B
Python

from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def index():
return render_template('main.html')
@app.route('/', methods=['POST'])
def convert():
text_input = request.form['textInput']
# Process the text_input and generate the SQL
# For example:
generated_sql = text_input
return render_template('main.html', generated_sql=generated_sql)
if __name__ == '__main__':
app.run(debug=True)