File size: 445 Bytes
c405952
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
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()