Team Ai
Apppublic

9farccontioshi/TranscriptApi

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes
README.md89 linesDownload Raw Back to root
1---2title: TranscriptApi3emoji: ⚡4colorFrom: pink5colorTo: green6sdk: docker7pinned: false8duplicated_from: Th3BossC/TranscriptApi9---10 11Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference12 13 14 15# TranscriptApi16 17TranscriptApi 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.18 19## Table of Contents20- [Features](#features)21- [Installation](#installation)22- [Usage](#usage)23 24## Features25 26- Extract and summarize textual content from YouTube videos or uploaded files.27- Utilizes deep learning models for accurate and efficient summarization.28- Provides a RESTful API for easy integration with other applications.29- Supports customization and configuration options to meet specific requirements.30 31## Installation32 331. Clone the repository:34 35```36git clone https://github.com/th3bossc/TranscriptApi.git37```38 392. Navigate to the project directory:40 41```42cd TranscriptApi43```44 453. Install the required dependencies using pip:46 47```48pip install -r requirements.txt49```50 514. Set up the necessary configuration variables, such as API keys, in the `.env` file.52 535. Run the Flask development server:54 55```56python app.py57```58 59The server should now be running locally at `http://localhost:5000`.60 61## Usage62 63To utilize the TranscriptApi service, you can make requests to the provided API endpoints. Here's an example using cURL:64 65```bash and python requet examples66 67# summarizing video68curl -X GET http://localhost:5000/video_api/your-video-id 69requests.get("http://localhost:5000/video_api/your-video-id")70 71# summaring pdf file72curl -X POST -H "Content-type : application/pdf" -F "files=@yourfile.pdf" http://localhost:5000/file_api/pdf73requests.post("http://localhost:5000/file_api/pdf", headers = {'Content-Type' : 'application/pdf'}, files = {'file' : open('yourfile.pdf', 'rb')})74 75# summaring text file76curl -X POST -H "Content-type : text/plain" -F "files=@yourfile.txt" http://localhost:5000/file_api/txt 77requests.post("http://localhost:5000/file_api/txt", headers = {'Content-Type' : 'text/plain'}, files = {'file' : open('yourfile.txt', 'rb')})78 79# summarizing raw text data80curl -X POST -d '{"text" : your-text-data}' http://localhost:5000/file_api/direct_text81requests.post("http://localhost:5000/file_api/direct_text, headers = {'Content-Type : 'application/json'}, json = {'text' : your-text-data})82 83```84 85Replace `your-video-id` with the actual YouTube video ID you want to summarize.86Replace `yourfile` with the actual file path of the file you want to summarize.87Replace `your-text-data` with the actual text string you want to summarize.88 89