Skip to content

Commit

Permalink
Merge pull request #9 from lgabs/create-docker-image
Browse files Browse the repository at this point in the history
Create docker image
  • Loading branch information
lgabs authored Nov 2, 2024
2 parents 925f43b + a24a190 commit 5f23d56
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 26 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,6 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
#.idea/

.vscode/
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3.10-slim

WORKDIR /app

COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt

COPY . .

EXPOSE 8501

ENV PYTHONPATH=/app

CMD ["streamlit", "run", "Homepage.py"]
12 changes: 0 additions & 12 deletions Homepage.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
import streamlit as st
import pandas as pd
import numpy as np
import scipy.stats
from scipy.stats import norm

import janus
from janus.stats.experiment import Experiment, Variant

from utils import save_results_in_session_state, print_warning

import logging

logging.basicConfig(level=logging.INFO)
Expand All @@ -17,8 +7,6 @@

st.image("logo.png", width=250)

print_warning()

st.markdown(
"""
# πŸ“Š Janus: The Bayesian A/B Test App
Expand Down
4 changes: 1 addition & 3 deletions pages/1_Analyze_with_Summary_Information.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@
create_per_user_dataframe_multivariate,
)

from utils import save_results_in_session_state, explain_metrics, print_warning
from utils import save_results_in_session_state, explain_metrics

st.set_page_config(page_title=" A/B Testing using summary information", page_icon="πŸ“Š")

print_warning()

st.markdown(
"""
# πŸ“Š A/B Testing using Summary Information
Expand Down
4 changes: 1 addition & 3 deletions pages/2_Analyze_with_Summary_CSV.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@
create_per_user_dataframe_multivariate,
)

from utils import save_results_in_session_state, explain_metrics, print_warning
from utils import save_results_in_session_state, explain_metrics

st.set_page_config(page_title="A/B Testing using summary CSV", page_icon="πŸ“Š")

print_warning()

st.markdown(
"""
# πŸ“Š A/B Testing using summary CSV
Expand Down
4 changes: 1 addition & 3 deletions pages/3_Analyze_with_Per_Impression_CSV.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
import janus
from janus.stats.experiment import Experiment, Variant

from utils import save_results_in_session_state, explain_metrics, print_warning
from utils import save_results_in_session_state, explain_metrics

st.set_page_config(page_title="A/B Testing using per-participant CSV", page_icon="πŸ“Š")

print_warning()

st.markdown(
"""
# πŸ“Š A/B Testing using per-participant CSV
Expand Down
3 changes: 0 additions & 3 deletions pages/4_Why_Bayesian.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import streamlit as st

import logging
from utils import print_warning

st.set_page_config(page_title="Why Bayesian?", page_icon="πŸ“Š")

logging.basicConfig(level=logging.INFO)

print_warning()

st.markdown(
"""
# πŸ“Š Why Bayesian?
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ pandas==1.4.4
numpy==1.25.1
scipy==1.11.1
streamlit==1.13.0
pyspark==3.0.0
altair==4.0
pyspark==3.0.0

0 comments on commit 5f23d56

Please sign in to comment.