diff --git a/pyproject.toml b/pyproject.toml index 5264f20..a8b8a21 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "senju" version = "0.1.0" description = "API / Webservice for Phrases/Words/Kanji/Haiku" -authors = [{ name = "Christoph J. Scherr", email = "software@cscherr.de" }] +authors = [{ name = "Christoph J. Scherr", email = "software@cscherr.de" },{name = "Moritz Marquard", email="mrmarquard@protonmail.com"}] readme = "README.md" requires-python = ">=3.10" dependencies = [ diff --git a/senju/main.py b/senju/main.py index 35a9b27..1f9be7b 100644 --- a/senju/main.py +++ b/senju/main.py @@ -53,6 +53,14 @@ def prompt_view(): ) +@app.route("/scan") +def scan_view(): + return render_template( + "scan.html", + title="Image scanning" + ) + + @app.route("/api/v1/haiku", methods=['POST']) def generate_haiku(): if request.method == 'POST': diff --git a/senju/templates/base.html b/senju/templates/base.html index fa78de1..070a240 100644 --- a/senju/templates/base.html +++ b/senju/templates/base.html @@ -43,6 +43,11 @@ {% if request.endpoint == 'prompt_view' %} bg-gray-900 text-white {% else %} text-gray-300 hover:bg-gray-700 hover:text-white {% endif %}"> Haiku generation + + Image scanning + Information diff --git a/senju/templates/index.html b/senju/templates/index.html index 3e1bbbf..67a7d27 100644 --- a/senju/templates/index.html +++ b/senju/templates/index.html @@ -1,4 +1,4 @@ {% extends "base.html" %} {% block content %} -

yo mama

+

{% endblock %} diff --git a/senju/templates/scan.html b/senju/templates/scan.html new file mode 100644 index 0000000..b84a917 --- /dev/null +++ b/senju/templates/scan.html @@ -0,0 +1,213 @@ +{% extends "base.html" %} + +{% block content %} + + + + + + Image Upload with Preview + + + +
+
+ +

Upload your image

+ +
+ +
+ + + + + + + + +
+ +
+

AI recognized the following:

+

Waiting for input...

+
+ + +
+
+ + + + +
+ + + + +{% endblock %}