Skip to content

Commit

Permalink
docker compsoe and streamlit updates
Browse files Browse the repository at this point in the history
  • Loading branch information
laugustyniak committed Apr 9, 2024
1 parent 94ae0a2 commit 571431d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,4 @@ checklink/cookies.txt
.history

secrets.env
postgres-juddges/**
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
["gpt-3.5-turbo-1106", "gpt-4-0125-preview", "gpt-4-1106-preview"],
)

if st.button("Ask for schema"):
if st.button("Generate schema to extract information"):
chain = prepare_schema_chain(model_name=llm_schema)
schema = chain.invoke({"SCHEMA_TEXT": schema_query})
if not schema:
Expand Down
9 changes: 3 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,15 @@ name: juddges
services:
web:
build: .
command: streamlit run /app/dashboards/app.py
command: streamlit run /app/dashboards/⚖️_Project_Information.py
volumes:
- ./:/app
- ~/.cache:/root/.cache
- L:\docker-configs\zsh\smartass_zsh_history:/root/.zsh_history
tty: true
shm_size: "2gb"
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- MLFLOW_TRACKING_URI=${MLFLOW_TRACKING_URI}
- MLFLOW_S3_ENDPOINT_URL=${MLFLOW_S3_ENDPOINT_URL}
- LOGNAME=${LOGNAME}
env_file:
- .env
restart: always
deploy:
resources:
Expand Down
11 changes: 7 additions & 4 deletions juddges/prompts/information_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,18 @@
"""

EXAMPLE_SCHEMA = """
date: date
verdict: string
verdict_date: date as ISO 8601
verdict: string, text representing verdict of the judgement
verdict_summary: string, short summary of the verdict
verdict_id: string
court: string
appellant: string
parties: string
appeal_against: string
first_trial: boolean
drug_offence: boolean
single_transaction_multiple_offence: boolean
child_offence: boolean
offence_seriousness: boolean
verdict_tags: List[string]
"""


Expand Down
4 changes: 1 addition & 3 deletions juddges/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ def prepare_langchain_cache() -> None:
langchain.llm_cache = SQLAlchemyMd5Cache(get_sqlalchemy_engine())


def prepare_mlflow(
experiment_name: str = MLFLOW_EXP_NAME, url="http://host.docker.internal"
) -> None:
def prepare_mlflow(experiment_name: str = MLFLOW_EXP_NAME, url="postgres-juddges") -> None:
mlflow.set_tracking_uri(url)
mlflow.set_experiment(experiment_name)
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
datasets==2.18.0
langchain-openai==0.1.1
langchain==0.1.13
langsmith==0.1.33
loguru==0.7.2
mpire==2.10.0
pandas==2.2.1
Expand Down

0 comments on commit 571431d

Please sign in to comment.