This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
from transformers import BlipForConditionalGeneration, BlipProcessor | |
# read in the model | |
processor = BlipProcessor.from_pretrained("nathansutton/generate-cxr") | |
model = BlipForConditionalGeneration.from_pretrained("nathansutton/generate-cxr") | |
# your data | |
my_image = 'my-chest-x-ray.jpg' | |
my_indication = 'RLL crackles, eval for pneumonia' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flyway_1 | Database: jdbc:postgresql://postgres:5432/athena (PostgreSQL 12.4) | |
flyway_1 | Successfully validated 54 migrations (execution time 00:00.320s) | |
flyway_1 | Creating Schema History table "public"."flyway_schema_history" ... | |
flyway_1 | Current version of schema "public": << Empty Schema >> | |
flyway_1 | Migrating schema "public" to version 0000 - relationship | |
flyway_1 | Migrating schema "public" to version 0001 - vocabulary | |
flyway_1 | Migrating schema "public" to version 0002 - concept ancestor | |
flyway_1 | Migrating schema "public" to version 0003 - concept | |
flyway_1 | Migrating schema "public" to version 0004 - concept relationship | |
flyway_1 | Migrating schema "public" to version 0005 - concept class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker-compose down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker-compose up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker-compose up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{sql connection=connection} | |
create view vw_model as | |
select | |
visit_occurrence_id | |
,person_id | |
,1.0 - 1.0 / (1.0 + EXP((-2.95983732216539) + (readmit_030_flg * 0.477723271743372) + (readmit_360_flg * 0.531143494501182) + (icd_history_518 * 0.651130360976662))) as risk | |
from vw_baseline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{r} | |
translate <- function(fit){ | |
### return the sql translation of a h2o.glm model ### | |
# safety | |
stopifnot(class(fit) %in% c("H2OBinomialModel","H2ORegressionModel")) | |
stopifnot(.hasSlot(fit, "algorithm")) | |
stopifnot(.hasSlot(fit, "model")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{python} | |
def translate (fit) : | |
"""return the sql translation of a H2OGeneralizedLinearEstimator""" | |
# pandas dependency | |
try: | |
import pandas.DataFrame | |
except ImportError: |