Skip to content

Commit

Permalink
Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ppinchuk committed Jul 3, 2024
1 parent 74d606e commit 1c52b8e
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions examples/ordinance_gpt/parse_pdf.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
import asyncio
from elm.base import ApiBase
from elm.web.document import PDFDocument
"""Example on parsing an existing PDF file for ordinances. """
from functools import partial

import openai
from langchain.text_splitter import RecursiveCharacterTextSplitter
from elm.ords.services.queues import initialize_service_queue

from rex import init_logger
from elm.base import ApiBase
from elm.web.document import PDFDocument
from elm.ords.llm import LLMCaller
from elm.ords.services.openai import OpenAIService
from elm.ords.utilities import RTS_SEPARATORS
from elm.ords.process import validate_api_params
from elm.ords.llm import LLMCaller
from elm.ords.extraction.ordinance import OrdinanceExtractor
from elm.ords.extraction.apply import extract_ordinance_values
from elm.ords.services.provider import run_with_services
from rex import init_logger

from elm.ords.extraction.apply import (check_for_ordinance_info,
extract_ordinance_text_with_llm)


if __name__ == '__main__':
init_logger('elm', log_level='INFO')

fp_pdf = './examples/ordinance_gpt/county_ord_files/Box Elder County, Utah.pdf'
fp_pdf = ('./examples/ordinance_gpt/county_ord_files/'
'Box Elder County, Utah.pdf')

fp_txt_all = fp_pdf.replace('.pdf', '.txt')
fp_txt_clean = fp_pdf.replace('.pdf', '_clean.txt')
Expand Down

0 comments on commit 1c52b8e

Please sign in to comment.