diff --git a/main.py b/main.py index da8b733..abdfc3a 100644 --- a/main.py +++ b/main.py @@ -15,7 +15,7 @@ # [START gae_python37_render_template] import datetime -from flask import Flask, render_template +from flask import Flask, render_template, request app = Flask(__name__) @@ -27,6 +27,14 @@ def root(): return render_template('index.html') +@app.route('/generate', methods=['POST']) +def story_request(): + is_story_block = request.form["story_block"] # is it a full story block or just an action? + prompt = request.form["prompt"] # given prompt + + return "Greetings from the planet Zenon!" + + if __name__ == '__main__': # This is used when running locally only. When deploying to Google App # Engine, a webserver process such as Gunicorn will serve the app. This diff --git a/templates/index.html b/templates/index.html index 1edcdac..a71af33 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,16 +1,16 @@ - -
-