diff --git a/recipes/natural_language_processing/summarizer/app/summarizer.py b/recipes/natural_language_processing/summarizer/app/summarizer.py index b734bf0b..487e9f8b 100644 --- a/recipes/natural_language_processing/summarizer/app/summarizer.py +++ b/recipes/natural_language_processing/summarizer/app/summarizer.py @@ -58,7 +58,7 @@ def chunk_text(text): for chunk in text_chunks: chunk = chunk.page_content chunk_kwargs = request_kwargs | {"json": {"input": chunk}} - count = requests.post(f"{model_service[:-2]}/v1/extras/tokenize/count", **chunk_kwargs).content + count = requests.post(f"{model_service[:-2]}extras/tokenize/count", **chunk_kwargs).content count = json.loads(count)["count"] if count >= 2048: split_append_chunk(chunk, chunks)