diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2014-03-01 15:26:45 -0500 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2014-03-01 15:30:27 -0500 |
| commit | bf74cd2294598c3dc1d73edd74ca88c87b7d6cd6 (patch) | |
| tree | fe74e894aabdc5ca6a8ee08fa3a0c1f7d0cb4094 /web/main.py | |
| parent | c5734b6b776727959f1b485651f1ddc7c8121a85 (diff) | |
| download | ocr-layer-curation-bf74cd2294598c3dc1d73edd74ca88c87b7d6cd6.tar.gz | |
Preliminary support for corrected text
* It's slow, need to figure out how to load it in the background maybe
* The bouding boxes could be improved
Diffstat (limited to 'web/main.py')
| -rw-r--r-- | web/main.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/main.py b/web/main.py index 582d33c..206eb86 100644 --- a/web/main.py +++ b/web/main.py @@ -3,7 +3,7 @@ from tornado.web import RequestHandler, Application import tornado.ioloop from settings import settings import utils -from parsedjvutext import image_from_book +from djvu_utils import image_from_book import io class MainHandler(RequestHandler): @@ -16,7 +16,7 @@ class MainHandler(RequestHandler): class ImageHandler(RequestHandler): def get(self, page_number): - im = image_from_book(self.settings["book"], int(page_number)) + im = image_from_book("../" + self.settings["book"], int(page_number)) self.set_header('Content-Type', 'image/jpg') img_buff = io.BytesIO() im.save(img_buff, format="JPEG") |
