podcaster / podcast_generator.py
marks
More changes
0ebcd8e
raw
history blame
445 Bytes
class PodcastGenerator:
def __init__(self, model_client):
self.model_client = model_client
def generate_podcast(self, scraped_content):
prompt = f"Create a podcast episode based on the following content: {scraped_content}"
response = self.model_client.generate(prompt, max_length=300) # Assuming 300 tokens is roughly 3 minutes
podcast_text = response.get('text', '')
return podcast_text.strip()