# Example prompt:
Using the content below, generate five FAQs with answers:
# Installation
To install the software, run `setup.exe` and follow the instructions.
from langchain.prompts import PromptTemplate
from langchain.llms import OpenAI
# Define the template
template = """
Below is the content from `Help.md`. Generate five FAQs based on it:
{content}
"""
prompt = PromptTemplate(input_variables=["content"], template=template)
# Load GPT-3.5 Turbo through LangChain
llm = OpenAI(model="gpt-3.5-turbo")
# Example content
help_md_content = """
## Installation
To install the software, download `setup.exe` and follow the installation
wizard.
"""
# Generate FAQs
faqs = llm(prompt.format(content=help_md_content))
print(faqs)
from transformers import pipeline
# Load a summarization pipeline
summarizer = pipeline("summarization", model="t5-small")
# Example input from Help.md content
help_content = """
## Installation
To install the software, download `setup.exe` from the official site and
follow the installation wizard.
"""
# Generate a summary
summary = summarizer(help_content, max_length=50, min_length=25,
do_sample=False)
print(summary[0]['summary_text'])