From 3c260ea0043c8263f2b25ab3b66b72a2b5d78e8f Mon Sep 17 00:00:00 2001 From: 0xjrx Date: Wed, 26 Feb 2025 19:57:42 +0100 Subject: [PATCH] feat: Add site for promt input to generate a Haiku Refs: OPS-50 --- senju/main.py | 6 ++++ senju/templates/haiku.jinja | 28 +++++++++++++++++ senju/templates/prompt.jinja | 59 ++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 senju/templates/haiku.jinja create mode 100644 senju/templates/prompt.jinja diff --git a/senju/main.py b/senju/main.py index c6d9bd0..d4f31c7 100644 --- a/senju/main.py +++ b/senju/main.py @@ -37,3 +37,9 @@ def haiku_view(haiku_id): "haiku.html", context=context, title="Haiku of the Day") +@app.route("/prompt") +def prompt_view(): + return render_template( + "prompt.jinja", + title= "Haiku generation" + ) diff --git a/senju/templates/haiku.jinja b/senju/templates/haiku.jinja new file mode 100644 index 0000000..797dc1e --- /dev/null +++ b/senju/templates/haiku.jinja @@ -0,0 +1,28 @@ +{% extends "base.jinja" %} + +{% block content %} +
+
+
+

Haiku of the Day

+

+ An old silent pond
+ A frog jumps into the pondβ€”
+ Splash! Silence again. +

+
+ + +
+
+{% endblock %} + diff --git a/senju/templates/prompt.jinja b/senju/templates/prompt.jinja new file mode 100644 index 0000000..42c5ff2 --- /dev/null +++ b/senju/templates/prompt.jinja @@ -0,0 +1,59 @@ +{% extends "base.jinja" %} + +{% block content %} +
+
+

Very 1337 prompt input

+
+ + +
+
+ +
+

Response:

+

Waiting for input...

+
+
+ + +{% endblock %} +