diff --git a/.coveragerc b/.coveragerc index 3dbfbb4..c712d25 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,2 +1,2 @@ [run] -omit = tests/* \ No newline at end of file +omit = tests/* diff --git a/docs/source/conf.py b/docs/source/conf.py index 3a1a6eb..f7adaa5 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -3,10 +3,13 @@ # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html +from __future__ import annotations + # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information import os import sys + sys.path.insert(0, os.path.abspath("../../senju")) project = 'senju' diff --git a/docs/source/index.rst b/docs/source/index.rst index aa7c231..d4ee233 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -16,4 +16,4 @@ documentation for details. :caption: Contents: usage - _modules/modules \ No newline at end of file + _modules/modules diff --git a/senju/main.py b/senju/main.py index 575dc73..a457e58 100644 --- a/senju/main.py +++ b/senju/main.py @@ -1,15 +1,14 @@ from __future__ import annotations +import os from pathlib import Path -from flask import (Flask, redirect, render_template, request, url_for, - send_from_directory) +from flask import (Flask, redirect, render_template, request, + send_from_directory, url_for) from senju.haiku import Haiku from senju.store_manager import StoreManager -import os - app = Flask(__name__) store = StoreManager(Path("/tmp/store.db")) @@ -121,7 +120,8 @@ def generate_haiku(): API endpoint to generate a new haiku based on the provided prompt. Accepts POST requests with JSON data containing a 'prompt' field. - Generates a haiku using the prompt, saves it to the store, and returns the ID. + Generates a haiku using the prompt, saves it to the store, + and returns the ID. Returns: str: The ID of the newly created haiku if method is POST. diff --git a/senju/templates/scan.html b/senju/templates/scan.html index b84a917..abe9564 100644 --- a/senju/templates/scan.html +++ b/senju/templates/scan.html @@ -12,7 +12,7 @@
- +

Upload your image

@@ -27,7 +27,7 @@
- + - + - + -
- +
+

AI recognized the following:

Waiting for input...

@@ -62,7 +62,7 @@
- +