해당 페이지는 DemianAI의 백엔드, 프론트엔드, 서버 배포의 내용을 담고 있습니다.

  1. 파이썬 장고 스택 선택과 그 이유

개발 당시, 핵심 기능을 구현할 수 있도록 하는 프레임 워크는 Lang Chain 이었다. Lang Chain 은 23년 5월 기준으로 파이썬 언어만을 지원하였고, 인공지능과 물리 수식 코드를 작성하였던 경험이 있던 나로서는 파이썬으로 서버를 구성하기로 마음 먹었다.

파이썬 웹 프레임 워크는 크게 “플라스크”와 “장고”로 양분화되어 있다. 이중, 나는 많은 사람들이 추천하는 장고로 벡엔드를 구성하기로 마음 먹었다.

  1. 설계

https://python.langchain.com/docs/modules/data_connection/document_loaders/pdf

from langchain.document_loaders import PyPDFLoader

loader = PyPDFLoader("example_data/layout-parser-paper.pdf")
pages = loader.load_and_split()

pages[0]

결과: Document(page_content=
'LayoutParser : A Uni\\x0ced Toolkit for Deep\\nLearning Based Document Image Analysis\\nZejiang Shen1( \\x00), Ruochen Zhang2, Melissa Dell3, Benjamin Charles Germain\\nLee4, Jacob Carlson3, and Weining Li5\\n1Allen Institute for AI\\[email protected]\\n2Brown University\\nruochen [email protected]\\n3Harvard University\\nfmelissadell,jacob carlson [email protected]\\n4University of Washington\\[email protected]\\n5University of Waterloo\\[email protected]\\nAbstract. Recent advances in document image analysis (DIA) have been\\nprimarily driven by the application of neural networks. Ideally, research\\noutcomes could be easily deployed in production and extended for further\\ninvestigation. However, various factors like loosely organized codebases\\nand sophisticated model con\\x0cgurations complicate the easy reuse of im-\\nportant innovations by a wide audience. Though there have been on-going\\ne\\x0borts to improve reusability and simplify deep learning (DL) model\\ndevelopment in disciplines like natural language processing and computer\\nvision, none of them are optimized for challenges in the domain of DIA.\\nThis represents a major gap in the existing toolkit, as DIA is central to\\nacademic research across a wide range of disciplines in the social sciences\\nand humanities. This paper introduces LayoutParser , an open-source\\nlibrary for streamlining the usage of DL in DIA research and applica-\\ntions. The core LayoutParser library comes with a set of simple and\\nintuitive interfaces for applying and customizing DL models for layout de-\\ntection, character recognition, and many other document processing tasks.\\nTo promote extensibility, LayoutParser also incorporates a community\\nplatform for sharing both pre-trained models and full document digiti-\\nzation pipelines. We demonstrate that LayoutParser is helpful for both\\nlightweight and large-scale digitization pipelines in real-word use cases.\\nThe library is publicly available at <https://layout-parser.github.io> .\\nKeywords: Document Image Analysis ·Deep Learning ·Layout Analysis\\n·Character Recognition ·Open Source library ·Toolkit.\\n1 Introduction\\nDeep Learning(DL)-based approaches are the state-of-the-art for a wide range of\\ndocument image analysis (DIA) tasks including document image classi\\x0ccation [ 11,arXiv:2103.15348v2  [cs.CV]  21 Jun 2021'
, metadata={'source': 'example_data/layout-parser-paper.pdf'
, 'page': 0})

처음 웹, 앱을 만드는 레벨이라서, 단순히 기능을 프레임 워크에 끼워 넣으면 되지 않을까 생각했다.

장고 백엔드 구현

  1. Flutter 스택 선택과 그 이유

바닐라 자바스크립트로 템플릿을 구성하던 중, 디자이너 없이 혼자 괜찮은 앱을 구현할 수 없을까 고민하였다. 그 중, flutter와 react-native가 눈에 들어왔다.

내가 구성하고자 하는 앱은 문서를 자유자재로 다룰 수 있는 앱이다. 사람들은 대부분 큰 디스플레이에서 문서를 다룬다. 따라서, 웹, 맥북, ios와 같은 비교적 큰 디바이스까지 한 번에 배포가 가능한 flutter 와 React-native는 매우 훌륭한 선택지였다. 그 중, flutter를 골랐다.

flutter 프론트엔드 구현