Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup for v1.0.8 #483

Merged
merged 4 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading