Skip to content
This repository was archived by the owner on Jul 27, 2025. It is now read-only.

Progresbyte/Pod-Plot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

PodPlot: Podcast Outline Generator

Backend (FastAPI Example)

# podplot_backend/main.py
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
import openai
import os

app = FastAPI()

openai.api_key = os.getenv("OPENAI_API_KEY")

class OutlineRequest(BaseModel):
    topic: str
    style: str

@app.post("/api/generate_outline")
async def generate_outline(req: OutlineRequest):
    prompt = (
        f"Generate a podcast episode outline for the topic '{req.topic}' in the style '{req.style}'. "
        "Include:\n- Episode title\n- Segment breakdown (intro, main content, outro)\n"
        "- Suggested discussion points\n- CTA ideas (like 'rate and subscribe')"
    )
    try:
        response = openai.ChatCompletion.create(
            model="gpt-4",
            messages=[{"role": "user", "content": prompt}],
            max_tokens=500,
            temperature=0.7,
        )
        outline = response.choices[0].message.content.strip()
        return {"outline": outline}
    except Exception as e:
        raise HTTPException(status_code=500, detail=str(e))

Frontend (React Example)

// src/App.jsx
import React, { useState } from "react";
import "./App.css";

function App() {
  const [topic, setTopic] = useState("");
  const [style, setStyle] = useState("Interview");
  const [outline, setOutline] = useState("");
  const [loading, setLoading] = useState(false);

  const handleSubmit = async (e) => {
    e.preventDefault();
    setLoading(true);
    setOutline("");
    const res = await fetch("/api/generate_outline", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({ topic, style }),
    });
    const data = await res.json();
    setOutline(data.outline);
    setLoading(false);
  };

About

AI-based tool to generate podcast outlines, episode structures, and titles!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published