Skip to content

Commit

Permalink
fix(api_cloud): fix api client
Browse files Browse the repository at this point in the history
  • Loading branch information
devangcx committed Jun 1, 2022
1 parent ae34772 commit 11b4854
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions handlers/api_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def set_client_for_simulation(host: str) -> ApiClient:
help=':bulb: You only need an API Key to access private projects. '
'If you do not have a key already go to the settings tab under your profile to '
'generate one.'
)
)

# create a query
query = Query(host)
Expand All @@ -27,18 +27,19 @@ def set_client_for_simulation(host: str) -> ApiClient:
)
api_client = ApiClient(api_token=api_key)

# add to session state
# add to session state
st.session_state.sim_client = api_client
st.session_state.query = query
st.session_state.api_key = api_key


def set_client_for_results(here: Path):
api_client = ApiClient()
api_client = ApiClient(api_token=st.session_state.api_key)
job = job_selector(api_client)
if job:
viz_file, results_path, model_dict, output_path = post_process_job(job,
here=here)
viz_file, results_path, model_dict, output_path = post_process_job(job,
here=here)
st.session_state.viz_file = viz_file
st.session_state.results_path = results_path
st.session_state.model_dict = model_dict
st.session_state.output_path = output_path
st.session_state.output_path = output_path

0 comments on commit 11b4854

Please sign in to comment.