This project is a FastAPI-based application that fetches YouTube video transcripts, summarizes them using OpenAI's GPT models (O1 PRO, O1-MINI) and Claude 3.5 SONNET, and returns the summary in a specified language.
- Python 3.7 or newer
- OpenAI API key
-
Clone the repository:
git clone https://github.com/yazilimacademy/sumryza-backend cd sumryza-backend/src
-
Install the required dependencies:
pip install fastapi uvicorn youtube-transcript-api openai python-dotenv
-
Set up your OpenAI API key:
- Create a
.env
file in the root of the project. - Add your OpenAI API key in the following format:
OPENAI_API_KEY=your_openai_api_key_here
- Create a
-
Run the application: Start the FastAPI server using Uvicorn:
uvicorn app:app --reload
-
Access the application: Once the server is running, you can access the API documentation at:
http://127.0.0.1:8000/docs
Fetches the transcript of a YouTube video and provides a summary in a specified language.
video_id
(str): The YouTube video ID (required).summary_language
(str): The preferred language for the summary (optional, default: "tr").
GET http://127.0.0.1:8000/transcript?video_id=VIDEO_ID&summary_language=en
{
"summary": "This is the summarized content of the video."
}
- The app tries ttis following to found a by more available transcript. All the application is iores for data deal and getting experiences.
- The summary will be provided in the specified language using OpenAI help-making.
- The parameters are video_id, summary_language, and responses as these want.
- The project seek questions in this repose informative easd read application. Example testing informativolad videaltanals.