This project enables automatic summarization of uploaded documents. It uses FastAPI for the backend and a frontend developed with Next.js and Tailwind CSS. The summarization and rephrasing models are powered by Hugging Face.
git clone git@github.com:RovaEncoder/DocSummarAI.git- Upload files in
.txtor.pdfformat. - Select a category to adapt the summarization model.
- Define the minimum and maximum length of the summary.
- Generated summaries are rephrased for better clarity.
- Real-time download and visualization.
- Python 3.8+
- Node.js 16+ and npm
- Hugging Face model weights (automatically downloaded during execution)
For fast answers, you can select the following options (without downloading) :
- Technical
- General
- Science
-
Navigate to the backend folder:
cd backend -
Install Python dependencies:
pip install -r requirements.txt
-
Start the backend:
uvicorn app.main:app --reload
The backend will now be available at
http://127.0.0.1:8000.
-
Navigate to the frontend folder:
cd frontend -
Install Node.js dependencies:
npm install
-
Start the development server:
npm run dev
The frontend will now be available at
http://localhost:3000.
- Open a browser and go to
http://localhost:3000.
- Upload a file in
.txtor.pdfformat or use files test in the files_test directory. - Choose an appropriate category (e.g.,
general,science,finance). - Specify the minimum and maximum lengths for the summary.
- Click the "Summarize File" button.
- The summary will appear in the right section of the screen.
- You can copy the summary by clicking "Copy Summary".
The models used are adapted based on the selected category:
| Category | Model |
|---|---|
| General | facebook/bart-large-cnn |
| Science | facebook/bart-large-cnn |
| Finance | google/pegasus-xsum |
| Medical | google/pegasus-large |
| Legal | facebook/bart-large-cnn |
| News | sshleifer/distilbart-cnn-12-6 |
| Technical | t5-small |
- Christ Rova ABESSOLO
- Ronan Kernen
