I'm getting accustomed to gpt and want to build a keywords extractor for book summaries. Can someone point me to the references that'd help for my use case ?
Asked
Active
Viewed 3,582 times
2
-
1Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jun 03 '22 at 04:16
-
I found this model to be a decent replacement: https://huggingface.co/google/flan-t5-large. Try the same prompt as below. – sachinruk Nov 06 '22 at 09:32
1 Answers
3
For extracting the keywords from the text you can use OpenAI GPT-3 model's Keyword extraction example
import os
import openai
openai.api_key = os.getenv("OPENAI_API_KEY")
response = openai.Completion.create(
model="text-davinci-002",
prompt="Extract keywords from this text:\n\nBlack-on-black ware is a 20th- and 21st-century pottery tradition developed by the Puebloan Native American ceramic artists in Northern New Mexico. Traditional reduction-fired blackware has been made for centuries by pueblo artists. Black-on-black ware of the past century is produced with a smooth surface, with the designs applied through selective burnishing or the application of refractory slip. Another style involves carving or incising designs and selectively polishing the raised areas. For generations several families from Kha'po Owingeh and P'ohwhóge Owingeh pueblos have been making black-on-black ware with the techniques passed down from matriarch potters. Artists from other pueblos have also produced black-on-black ware. Several contemporary artists have created works honoring the pottery of their ancestors.",
temperature=0.3,
max_tokens=60,
top_p=1.0,
frequency_penalty=0.8,
presence_penalty=0.0
)
Some references:

AADARSH K
- 81
- 1
- 6
-
Hi, Thank you for this! Is it possible to use this GPT-3 for free, or one has to pay OPENAI anyway? – Valerio Ficcadenti Dec 11 '22 at 19:23
-
@ValerioFiccadenti OpenAI provides a free trail with some credits. After that we need to pay. Check out their pricing [here](https://openai.com/api/pricing/). To mention, [ChatGPT](https://chat.openai.com/chat) is free for now as a part of research preview. – AADARSH K Dec 13 '22 at 06:48