Dan Walsh commited on
Commit
7e17f7b
·
1 Parent(s): 076e53d

Updating project structure and README to reflect

Browse files
Files changed (1) hide show
  1. README.md +82 -6
README.md CHANGED
@@ -9,17 +9,93 @@ pinned: false
9
  license: mit
10
  ---
11
 
12
- # AI Content Summariser API
13
 
14
  This is the backend API for the AI Content Summariser, a tool that automatically generates concise summaries of articles, documents, and web content using natural language processing.
15
 
16
- ## API Endpoints
17
-
18
- - POST /api/summarise - Summarize text content
19
- - POST /api/summarise-url - Extract and summarize content from a URL
20
 
21
  ## Features
22
 
23
- - Text summarization using state-of-the-art NLP models
24
  - URL content extraction and summarization
25
  - Adjustable parameters for summary length and style
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  license: mit
10
  ---
11
 
12
+ # AI Content Summariser API (Backend)
13
 
14
  This is the backend API for the AI Content Summariser, a tool that automatically generates concise summaries of articles, documents, and web content using natural language processing.
15
 
16
+ The frontend application is available in a separate repository: [ai-content-summariser](https://github.com/dang-w/ai-content-summariser).
 
 
 
17
 
18
  ## Features
19
 
20
+ - Text summarization using state-of-the-art NLP models (BART-large-CNN)
21
  - URL content extraction and summarization
22
  - Adjustable parameters for summary length and style
23
+ - Efficient API endpoints with proper error handling
24
+
25
+ ## API Endpoints
26
+
27
+ - `POST /api/summarise` - Summarize text content
28
+ - `POST /api/summarise-url` - Extract and summarize content from a URL
29
+
30
+ ## Technology Stack
31
+
32
+ - **Framework**: FastAPI for efficient API endpoints
33
+ - **NLP Models**: Transformer-based models (BART) for summarisation
34
+ - **Web Scraping**: BeautifulSoup4 for extracting content from URLs
35
+ - **HTTP Client**: HTTPX for asynchronous web requests
36
+ - **Deployment**: Hugging Face Spaces or Docker containers
37
+
38
+ ## Getting Started
39
+
40
+ ### Prerequisites
41
+
42
+ - Python (v3.8+)
43
+ - pip
44
+
45
+ ### Installation
46
+
47
+ ```bash
48
+ # Clone the repository
49
+ git clone https://github.com/dang-w/ai-content-summariser-api.git
50
+ cd ai-content-summariser-api
51
+
52
+ # Install dependencies
53
+ pip install -r requirements.txt
54
+ ```
55
+
56
+ ### Running Locally
57
+
58
+ ```bash
59
+ # Start the backend server
60
+ uvicorn main:app --reload
61
+ ```
62
+
63
+ The API will be available at `http://localhost:8000`.
64
+
65
+ ### Running with Docker
66
+
67
+ ```bash
68
+ # Build and run with Docker
69
+ docker build -t ai-content-summariser-api .
70
+ docker run -p 8000:8000 ai-content-summariser-api
71
+ ```
72
+
73
+ ## Deployment
74
+
75
+ See the deployment guide in the frontend repository for detailed instructions on deploying both the frontend and backend components.
76
+
77
+ ### Deploying to Hugging Face Spaces
78
+
79
+ 1. Create a new Space on Hugging Face
80
+ 2. Choose FastAPI as the SDK
81
+ 3. Upload your backend code
82
+ 4. Configure the environment variables:
83
+ - `CORS_ORIGINS`: Your frontend URL
84
+
85
+ ## Development
86
+
87
+ ### Testing the API
88
+
89
+ You can test the API endpoints using the built-in Swagger documentation at `/docs` when running locally.
90
+
91
+ ### Checking Transformers Installation
92
+
93
+ To verify that the transformers library is installed correctly:
94
+
95
+ ```bash
96
+ python -m app.check_transformers
97
+ ```
98
+
99
+ ## License
100
+
101
+ This project is licensed under the MIT License.