Skip to content

Commit

Permalink
Cleanup for v1.0.8 (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
caufieldjh authored Nov 21, 2024
2 parents 94aa11b + 82f0d1b commit 0f83736
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ontogpt"
version = "1.0.7"
version = "1.0.8"
description = "OntoGPT"
authors = ["Chris Mungall <[email protected]>", "J. Harry Caufield <[email protected]>"]
license = "BSD-3"
Expand Down
2 changes: 1 addition & 1 deletion src/ontogpt/evaluation/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

from ontogpt.evaluation.ctd.eval_ctd import EvalCTD
from ontogpt.evaluation.ctd.eval_ctd_ner import EvalCTDNER
from ontogpt.evaluation.maxo.eval_maxo import EvalMAXO
from ontogpt.evaluation.evaluation_engine import SPIRESEvaluationEngine
from ontogpt.evaluation.maxo.eval_maxo import EvalMAXO

resolver = ClassResolver([EvalCTD, EvalCTDNER, EvalMAXO], base=SPIRESEvaluationEngine)

Expand Down
12 changes: 11 additions & 1 deletion src/ontogpt/utils/clinical_cases.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
"""Utilities for working with clinical case reports."""
"""Utilities for working with clinical case reports.
The prompt in get_kanjee_prompt() is that used by
the following citation:
Kanjee Z, Crowe B, Rodman A. Accuracy of a
generative artificial intelligence model in
a complex diagnostic challenge. JAMA.
2023 Jul 3;330(1):78–80.
http://dx.doi.org/10.1001/jama.2023.8288
PMCID: PMC10273128
"""

def get_kanjee_prompt() -> str:
"""Prompt from Kanjee et al. 2023."""
Expand Down
31 changes: 30 additions & 1 deletion src/ontogpt/webapp/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,33 @@
"""Webapp main function."""
"""OntoGPT Webapp main function.
This module sets up a FastAPI web application for
the OntoGPT project. It includes routes for handling
GET and POST requests, and integrates with components
such as SPIRESEngine and HTMLExporter to process and
display data.
Classes:
Query: A Pydantic model representing the structure
of the form data.
Functions:
get_engine(datamodel: str, llm_model: str) -> SPIRESEngine:
Retrieves or initializes a SPIRESEngine instance for
the given datamodel and LLM model.
read_root(request: Request) -> TemplateResponse:
Handles GET requests to the root URL,
rendering the form.html template.
form_post(request: Request, datamodel: str = Form(...),
text: str = Form(...), llm_model: str = Form(...))
-> TemplateResponse:
Handles POST requests to the root URL, processing
the form data and rendering the results.html template.
start():
Launches the FastAPI application using Uvicorn.
"""

from io import StringIO
from pathlib import Path
Expand Down

0 comments on commit 0f83736

Please sign in to comment.