Created
July 12, 2023 15:45
-
-
Save joaofig/260ca5bd2899be2a134cd44c8104f13e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def predict(max_branch: int = 3, | |
max_length: int = 10) -> FeatureGroup | None: | |
fg = folium.FeatureGroup(name="polylines") | |
if "token_list" in st.session_state: | |
token_list = st.session_state["token_list"] | |
seed = token_list[-3:-1] | |
if len(seed) > 1: | |
paths = expand_seed(seed[0], seed[1], | |
max_branch=max_branch, | |
max_length=max_length) | |
for path in paths[:max_branch]: | |
fg.add_child(path.get_polyline()) | |
return fg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment