Spaces:
Runtime error
Runtime error
File size: 398 Bytes
0eb1950 5760606 0eb1950 5760606 0eb1950 5760606 0eb1950 5760606 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
from ai import llm
from utils.io import print_system
PROMPT = """
Here is the text from a website:
{text}
Extract or create the 10 best headlines for an ad about the website.
"""
def get_headlines(text: str) -> str:
print_system("Generating headlines...")
instructions = PROMPT.format(text=text)
messages = [{"role": "user", "content": instructions}]
return llm.next(messages)
|