Simplifier is a web application that simplifies domain-specific text based on an individual's expertise and education level. It uses web scraping and AI-powered text analysis to provide simplified versions and summaries of complex content.
- Web scraping to extract text from URLs
- Text simplification based on user's expertise and education level
- Bullet-point summary generation
- RESTful API for easy integration
- User-friendly React-based web interface
- Backend: Python, Flask
- Frontend: React, JavaScript, HTML, CSS
- AI: OpenAI GPT-4
Before you begin, ensure you have met the following requirements:
- Python 3.11 or higher
- pip (Python package manager)
- Node.js and npm (for React frontend)
- An OpenAI API key
- A modern web browser
The project is organized into two main directories:
simplifier/
├── backend/
│ ├── backend.py
│ ├── requirements.txt
│ └── settings.yaml
└── frontend/
├── public/
├── src/
├── package.json
└── README.md
-
Clone the repository:
git clone https://github.com/yourusername/simplifier.git cd simplifier
-
Set up the backend:
cd backend python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` pip install -r requirements.txt
-
Set up your OpenAI API key: Create a
settings.yaml
file in thebackend
directory and add your API key:OpenAPI_KEY: 'your_api_key_here'
-
Set up the frontend:
cd ../frontend npm install
-
Start the backend server:
cd backend source venv/bin/activate # If not already activated python backend.py
-
In a new terminal, start the frontend development server:
cd frontend npm start
-
Open your web browser and navigate to
http://localhost:3000
-
Use the web interface to:
- Enter a URL or paste text directly
- Select your expertise level and education level
- Click "Simplify" to get a simplified version and summary of the content
The backend provides a RESTful API for integration with other services.
Simplifies and summarizes text from a given URL.
Request body:
url
(string, required): The URL to scrape and analyzeexpertise
(string, required): User's expertise level (e.g., "beginner", "intermediate", "expert")education_level
(string, required): User's education level (e.g., "high school", "undergraduate", "graduate")
Response:
text
(string): Simplified version of the original textsummary
(string): Bullet-point summary of key points
Simplifies and summarizes provided text.
Request body:
text
(string, required): The text to analyzeexpertise
(string, required): User's expertise leveleducation_level
(string, required): User's education level
Response:
text
(string): Simplified version of the original textsummary
(string): Bullet-point summary of key points
The React-based frontend is located in the frontend
directory. Key files and directories include:
src/
: Contains the React components and main application logicpublic/
: Contains the public assets andindex.html
package.json
: Defines the project dependencies and scripts
The interface allows users to input either a URL or direct text, select their expertise and education levels, and receive simplified text and a summary.
Contributions to the Simplifier project are welcome. Please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature/AmazingFeature
) - Make your changes
- Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Your Name - your.email@example.com
Project Link: https://github.com/yourusername/simplifier