mirror of
https://github.com/neuml/txtai.git
synced 2026-10-11 21:39:55 +00:00
6.8 KiB
6.8 KiB
In [ ]:
%%capture
!pip install git+https://github.com/neuml/txtai#egg=txtai[pipeline]In [ ]:
%%capture
from txtai.pipeline import Summary
# Create summary model
summary = Summary()In [ ]:
text = ("Search is the base of many applications. Once data starts to pile up, users want to be able to find it. It’s the foundation "
"of the internet and an ever-growing challenge that is never solved or done. The field of Natural Language Processing (NLP) is "
"rapidly evolving with a number of new developments. Large-scale general language models are an exciting new capability "
"allowing us to add amazing functionality quickly with limited compute and people. Innovation continues with new models "
"and advancements coming in at what seems a weekly basis. This article introduces txtai, an AI-powered search engine "
"that enables Natural Language Understanding (NLU) based search in any application."
)
summary(text, maxlength=10)'Search is the foundation of the internet'
In [ ]:
!wget -q "https://medium.com/neuml/time-lapse-video-for-the-web-a7d8874ff397"
from txtai.pipeline import Textractor
textractor = Textractor()
text = textractor("time-lapse-video-for-the-web-a7d8874ff397")
summary(text)'Time-lapse video is a popular way to show an area or event over a long period of time. The same concept can be applied to a dynamic real-time website with frequently updated data. webelapse is an open source project developed to provide this functionality. It can be used as is or modified for different use cases.'