In this example, we'll generate a concise summary of the films showing at a local indie movie theater.
Before we begin the Substrate part of this example, we'll first fetch the html content of the theater's calendar page, and use BeautifulSoup (opens in a new tab) to find urls
for all films showing today or tomorrow.
Now, we'll process all of these urls
in parallel using Substrate nodes.
First, initialize Substrate and create a model for film info, which we'll use to generate a JSON summary of the film web page's content.
For each of the urls
we found on the calendar page, we'll:
- Get the markdown content of the film page using RunPython
- Generate a JSON summary of the markdown content using ComputeJSON
- Collect all the JSON summaries and generate a markdown summary using ComputeText
Example Output
Thriller/Suspense
Lost Highway (opens in a new tab) - A jazz musician's life is turned upside down when he is accused of murdering his wife. Showtimes: TODAY at 7:50pm, Monday June 10 at 9:30pm, Thursday June 13 at 4:30pm
Three Days of the Condor (opens in a new tab) - A CIA codebreaker must survive a deadly conspiracy within his own agency. Showtimes: 9:30pm
Action/Crime
AGGRO DR1FT (opens in a new tab) - A tormented assassin takes on a Miami crime syndicate while balancing family life. Showtimes: TODAY at 10:30pm