| from fastapi import FastAPI | |
| from embedding import PDFEmbedding | |
| app = FastAPI() | |
| def greet_json(): | |
| return {"Hello": "World!"} | |
| # API ์๋ํฌ์ธํธ๋ก ์ด๋๋จ | |
| # app.py์ ๋ค์ ์ฝ๋ ์ฐธ์กฐ: | |
| def process_pdfs(): | |
| pdf_embedding = PDFEmbedding( | |
| model_path="../ai_models/hf/BGE-m3-ko", | |
| pdf_dir="./data/pdf" | |
| ) | |
| pdf_embedding.process_and_store() | |
| return {"status": "success"} |