Skip to content

Commit

Permalink
Merge pull request #2 from a-gleeson/new-poetry-jo
Browse files Browse the repository at this point in the history
Updated pyproject.toml to allow local running of app
  • Loading branch information
James-Osmond authored Apr 16, 2024
2 parents f4bbacd + 9f7242d commit 67c1811
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 6 additions & 5 deletions hackathon/streamlit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@
S3_LOADER_FILE_NAME,
VECTOR_STORE_CONFIG,
)
from hackathon.llm.chain_config import (

)
# from hackathon.llm.chain_config import (
# # Empty for now
# )
from hackathon.llm.llm import LLama2, SagemakerHostedLLM
from hackathon.llm.llm_handler import LLMRunner
from hackathon.loader.chunker import TextChunker
Expand Down Expand Up @@ -156,11 +157,11 @@ def initialise_llm_runner():
llm_runner = LLMRunner(
llm=llm,
vectorstore=vector_store,
chain_configs=[
],
chain_configs=[],
)
st.session_state["runner"] = llm_runner


def initialise_vector_store_loader():
if LLM_MODEL == "local_llm":
st_embedder = SentenceTransformerEmbeddings(
Expand Down Expand Up @@ -197,9 +198,9 @@ def initialise_vector_store_loader():
chunker=TextChunker(chunk_size=1000, overlap=10),
)


def safe_literal_eval(x):
try:
return literal_eval(x)
except (SyntaxError, ValueError):
return None

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
name = "hackathon"
version = "0.1.0"
description = ""
authors = [""]
authors = ["James Osmond <[email protected]>"]
readme = "README.md"

packages = [
{ include = "hackathon" },
{ include = "app" },
{ include = "config" },
]

[tool.poetry.dependencies]
Expand Down

0 comments on commit 67c1811

Please sign in to comment.