Th3BossC/TranscriptApi
1
1---2title: TranscriptApi3emoji: ⚡4colorFrom: pink5colorTo: green6sdk: docker7pinned: false8---9 10Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference11 12 13 14# TranscriptApi15 16TranscriptApi is a backend service written in Flask that provides a RESTful API for summarizing YouTube videos or uploaded files using deep learning models. It allows users to extract and summarize the textual content from video or audio files, enabling easy access to key information.17 18## Table of Contents19- [Features](#features)20- [Installation](#installation)21- [Usage](#usage)22 23## Features24 25- Extract and summarize textual content from YouTube videos or uploaded files.26- Utilizes deep learning models for accurate and efficient summarization.27- Provides a RESTful API for easy integration with other applications.28- Supports customization and configuration options to meet specific requirements.29 30## Installation31 321. Clone the repository:33 34```35git clone https://github.com/th3bossc/TranscriptApi.git36```37 382. Navigate to the project directory:39 40```41cd TranscriptApi42```43 443. Install the required dependencies using pip:45 46```47pip install -r requirements.txt48```49 504. Set up the necessary configuration variables, such as API keys, in the `.env` file.51 525. Run the Flask development server:53 54```55python app.py56```57 58The server should now be running locally at `http://localhost:5000`.59 60## Usage61 62To utilize the TranscriptApi service, you can make requests to the provided API endpoints. Here's an example using cURL:63 64```bash and python requet examples65 66# summarizing video67curl -X GET http://localhost:5000/video_api/your-video-id 68requests.get("http://localhost:5000/video_api/your-video-id")69 70# summaring pdf file71curl -X POST -H "Content-type : application/pdf" -F "files=@yourfile.pdf" http://localhost:5000/file_api/pdf72requests.post("http://localhost:5000/file_api/pdf", headers = {'Content-Type' : 'application/pdf'}, files = {'file' : open('yourfile.pdf', 'rb')})73 74# summaring text file75curl -X POST -H "Content-type : text/plain" -F "files=@yourfile.txt" http://localhost:5000/file_api/txt 76requests.post("http://localhost:5000/file_api/txt", headers = {'Content-Type' : 'text/plain'}, files = {'file' : open('yourfile.txt', 'rb')})77 78# summarizing raw text data79curl -X POST -d '{"text" : your-text-data}' http://localhost:5000/file_api/direct_text80requests.post("http://localhost:5000/file_api/direct_text, headers = {'Content-Type : 'application/json'}, json = {'text' : your-text-data})81 82```83 84Replace `your-video-id` with the actual YouTube video ID you want to summarize.85Replace `yourfile` with the actual file path of the file you want to summarize.86Replace `your-text-data` with the actual text string you want to summarize.87 88 