Spaces:
Runtime error
Runtime error
"""This module contains the prompts for the application.""" | |
# import jinja2 template prompt | |
from jinja2 import Template | |
def load_prompt(prompt_path: str) -> str: | |
"""Load the prompt from the given path.""" | |
with open(prompt_path, "r", encoding="utf-8") as file: | |
prompt = Template(file.read()) | |
return prompt.render() | |