Skip to content

Commit

Permalink
Updates to remove integrated-tr container.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sorrento110 committed Jul 13, 2023
1 parent 93d4cea commit 2a1a4d4
Show file tree
Hide file tree
Showing 8 changed files with 276 additions and 24 deletions.
3 changes: 2 additions & 1 deletion api.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ REDIS_PORT=6379
TDS_URL=http://data-service-api:8000
SKEMA_RS_URL=http://skema-rs:8080
TA1_UNIFIED_URL=http://skema-unified:8000
INTEGRATED_TR_URL=http://integrated-tr:7778
INTEGRATED_TR_URL=http://integrated-tr:7778
MIT_TR_URL=http://mit-tr:8000
Binary file modified api/__pycache__/server.cpython-310.pyc
Binary file not shown.
18 changes: 18 additions & 0 deletions api/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ async def pdf_extractions(
text_content += page.decode("utf-8")

operation_name = "operations.pdf_extractions"

# text_content = text_content[: len(text_content) // 2]
options = {
"text_content": text_content,
"annotate_skema": annotate_skema,
Expand All @@ -118,3 +120,19 @@ async def pdf_extractions(
resp = create_job(operation_name=operation_name, options=options)

return resp


@app.post("/profile_dataset")
def profile_dataset(dataset_id, document_text):
from utils import create_job

operation_name = "operations.data_profiling"

options = {
"dataset_id": dataset_id,
"document_text": document_text,
}

resp = create_job(operation_name=operation_name, options=options)

return resp
6 changes: 0 additions & 6 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ services:
service: skema-tr
networks:
- ta1-extraction-service
integrated-tr:
extends:
file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
service: integrated-tr
networks:
- ta1-extraction-service
skema-py:
extends:
file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
Expand Down
156 changes: 155 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ authors = ["Powell Fendley"]
readme = "README.md"
packages = [{include = "extraction_service"}]



[tool.poetry.dependencies]
python = "^3.9"
redis = "^4.6.0"
Expand All @@ -17,9 +19,10 @@ python-multipart = "^0.0.6"
uvicorn = { version = "^0.22.0", optional = true }
fastapi = { version = "^0.100.0", optional = true }
pypdf = { version = "^3.12.0", optional = true }
pandas = { version = "^2.0.3", optional = true }

[tool.poetry.extras]
api = ["uvicorn", "fastapi", "pypdf"]
api = ["uvicorn", "fastapi", "pypdf", "pandas"]

[build-system]
requires = ["poetry-core"]
Expand Down
Loading

0 comments on commit 2a1a4d4

Please sign in to comment.