TranscriptApi / README.md
Th3BossC's picture
proper commit
b8b87ed
metadata
title: TranscriptApi
emoji: 
colorFrom: pink
colorTo: green
sdk: docker
pinned: false

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

TranscriptApi

TranscriptApi 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.

Table of Contents

Features

  • Extract and summarize textual content from YouTube videos or uploaded files.
  • Utilizes deep learning models for accurate and efficient summarization.
  • Provides a RESTful API for easy integration with other applications.
  • Supports customization and configuration options to meet specific requirements.

Installation

  1. Clone the repository:
git clone https://github.com/th3bossc/TranscriptApi.git
  1. Navigate to the project directory:
cd TranscriptApi
  1. Install the required dependencies using pip:
pip install -r requirements.txt
  1. Set up the necessary configuration variables, such as API keys, in the .env file.

  2. Run the Flask development server:

python app.py

The server should now be running locally at http://localhost:5000.

Usage

To utilize the TranscriptApi service, you can make requests to the provided API endpoints. Here's an example using cURL:


# summarizing video
curl -X GET http://localhost:5000/video_api/your-video-id 
requests.get("http://localhost:5000/video_api/your-video-id")

# summaring pdf file
curl -X POST -H "Content-type : application/pdf" -F "[email protected]" http://localhost:5000/file_api/pdf
requests.post("http://localhost:5000/file_api/pdf", headers = {'Content-Type' : 'application/pdf'}, files = {'file' : open('yourfile.pdf', 'rb')})

# summaring text file
curl -X POST -H "Content-type : text/plain" -F "[email protected]" http://localhost:5000/file_api/txt 
requests.post("http://localhost:5000/file_api/txt", headers = {'Content-Type' : 'text/plain'}, files = {'file' : open('yourfile.txt', 'rb')})

# summarizing raw text data
curl -X POST -d '{"text" : your-text-data}' http://localhost:5000/file_api/direct_text
requests.post("http://localhost:5000/file_api/direct_text, headers = {'Content-Type : 'application/json'}, json = {'text' : your-text-data})

Replace your-video-id with the actual YouTube video ID you want to summarize. Replace yourfile with the actual file path of the file you want to summarize. Replace your-text-data with the actual text string you want to summarize.