diff --git a/promptify/models/nlp/utils/utils.py b/promptify/models/nlp/utils/utils.py index e2f46a5..224ff7f 100644 --- a/promptify/models/nlp/utils/utils.py +++ b/promptify/models/nlp/utils/utils.py @@ -31,7 +31,8 @@ def download(url, destination_file): for chunk in response.iter_content(chunk_size=1048576): f.write(chunk) - if last_modified := response.headers.get("last-modified"): + last_modified = response.headers.get("last-modified") + if last_modified: new_mtime = parsedate_to_datetime(last_modified).timestamp() os.utime(destination_file, times=(datetime.now().timestamp(), new_mtime)) return destination_file diff --git a/promptify/prompts/nlp/templates/summary.jinja b/promptify/prompts/nlp/templates/summary.jinja index ab481a1..de63d60 100644 --- a/promptify/prompts/nlp/templates/summary.jinja +++ b/promptify/prompts/nlp/templates/summary.jinja @@ -11,7 +11,7 @@ You are a highly intelligent {{ domain }} domain expert Summarization system. Yo {% else %} You are a highly intelligent Summarization system. You take Passage as input and summarize the passage as an expert. {% endif -%} -Your output format is only {{ output_format|default("[{'S': Summarization paragraph}},]") } form, no other form. +Your output format is only {{ output_format|default("[{'S': Summarization paragraph}},]") }} form, no other form. Passage: {{ text_input }} Output: