kelly-data / index.py
Teddy Xinyuan Chen
2024-04-11T22-51-57Z
f571c33 unverified
raw
history blame
807 Bytes
import asyncio
from datasette.app import Datasette
import json
import pathlib
import os
static_mounts = [
(static, str((pathlib.Path(".") / static).resolve()))
for static in []
]
metadata = dict()
try:
metadata = json.load(open("metadata.json"))
except Exception:
pass
secret = os.environ.get("DATASETTE_SECRET")
true, false = True, False
ds = Datasette(
[],
["agency_classifier-agency_bios.db", "agency_classifier-agency_dataset.db", "biography_dataset-preprocessed_bios.db", "biography_dataset-sampled_bios.db", "evaluated_letters-chatgpt-cbg.db", "evaluated_letters-chatgpt-clg.db", "generated_letters-chatgpt-cbg.db"],
static_mounts=static_mounts,
metadata=metadata,
secret=secret,
cors=True,
settings={}
)
asyncio.run(ds.invoke_startup())
app = ds.app()