Spaces:
Runtime error
Runtime error
# Flask 應用程式碼 | |
from flask import Flask, render_template, request, jsonify | |
from trueGPT import get_response | |
app = Flask(__name__) | |
def home(): | |
return render_template('index.html') | |
def process_input(): | |
user_input = request.json['user_input'] | |
response = get_response(user_input) | |
return jsonify(response=response) | |
if __name__ == '__main__': | |
get_response("preheat") | |
app.run(host='0.0.0.0',port=7860, debug=True) | |