Skip to content

Commit

Permalink
fix pydantic error 4
Browse files Browse the repository at this point in the history
  • Loading branch information
sborms committed Oct 22, 2023
1 parent 0bdad72 commit 9af2808
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions webapp/pages/05_📣_Coachbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
st.set_page_config(page_title="Coachbot", page_icon="📣", layout="wide")


@st.cache_resource()
# @st.cache_resource()
def load_chain(input_openai_api_key=openai.api_key, context=""):
"""Configures a conversational chain for answering user questions."""
# load OpenAI's language model
Expand Down Expand Up @@ -88,10 +88,10 @@ def prepare_prompt_team_context(dict_info):
)
st.session_state["team"] = team

st.button("Let's chat!")
go = st.button("Let's chat!")

# initialize navbar and chat window
else:
if go:
with st.sidebar:
with st.container():
st.success(
Expand Down
14 changes: 7 additions & 7 deletions webapp/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def query_nbr_next_games(_conn, dates):
return df


@st.cache_data
@st.cache_data(show_spinner=False)
def query_teams(_conn):
q = """
select
Expand Down Expand Up @@ -70,7 +70,7 @@ def query_teams(_conn):
return df


@st.cache_data
@st.cache_data(show_spinner=False)
def query_players(_conn):
q = """
select distinct
Expand All @@ -91,7 +91,7 @@ def query_players(_conn):
return df


@st.cache_data
@st.cache_data(show_spinner=False)
def query_stats_agg(_conn):
q = """
select distinct
Expand All @@ -112,12 +112,12 @@ def query_stats_agg(_conn):
return df


@st.cache_data
@st.cache_data(show_spinner=False)
def query_list_teams(_conn):
return _conn.query("select distinct team from teams;")


@st.cache_data
@st.cache_data(show_spinner=False)
def query_schedule(_conn, team):
q = f"""
select
Expand All @@ -133,7 +133,7 @@ def query_schedule(_conn, team):
return df


@st.cache_data
@st.cache_data(show_spinner=False)
def query_stats_players(_conn, team):
q = f"""
select
Expand All @@ -151,7 +151,7 @@ def query_stats_players(_conn, team):
return df


@st.cache_data
@st.cache_data(show_spinner=False)
def query_standings(_conn, team):
q = f"""
select
Expand Down

0 comments on commit 9af2808

Please sign in to comment.