This repository contains both the backend API and frontend application for the AI-Powered Study Assistant. The backend provides text summarization capabilities through a REST API, while the frontend offers a user-friendly interface for interacting with these features.
- Python 3.8 or higher
- pip (Python package installer)
- Android Studio (for frontend development)
- JDK 11 or higher
- Open the project in Android Studio.
- Sync the project with Gradle files.
- Run the application on an emulator or a physical device.
- Open the project in Android Studio.
- Click on the "Run" button to launch the application on an emulator or a physical device.
Frontend/app/src/main/java/com/musketeers_and_me/ai_powered_study_assistant_app/
├── assets/ # Raw asset files bundled with the app (e.g., text, fonts, templates)
├── Courses/ # Screens and logic for creating, viewing, and managing courses
├── DatabaseProvider/ # Database access and operations (e.g., Firebase integration)
├── GroupStudy/ # Features for group study sessions and collaborative tools
├── LectureAndNotes/ # Management of lectures, notes, and image uploads
├── Models/ # Data models and classes representing app entities
├── Opening_Registration/ # User onboarding, login, and registration flows
├── OuterStructure/ # App-wide structural components and navigation logic
├── QuizCenter/ # Quiz management, participation, and results display
├── QuizStructure/ # Definitions and logic for quiz formats and questions
├── Services/ # Background services and app-wide service logic
├── SmartDigest/ # AI-powered summarization and smart content extraction
├── Utils/ # Utility classes and helper functions for common tasks
├── AuthService.kt # Authentication service logic
├── MainActivity.kt # Main entry point and navigation for the app
└── MyApplication.kt # Application class for global app configuration
This repository contains the backend API for the AI-Powered Study Assistant application. The backend provides text summarization capabilities through a REST API.
- Clone the repository:
cd ML_Backend- Create and activate a virtual environment:
# Windows
python -m venv venv
.\venv\Scripts\activate
# Linux/MacOS
python -m venv venv
source venv/bin/activate- Install the required dependencies:
- Start the Flask server:
python app.pyThe server will start running at http://127.0.0.1:5000
- URL:
/summarize - Method:
POST - Content-Type:
multipart/form-data
| Key | Type | Description |
|---|---|---|
| text | string | The text you want to summarize |
| context (optional) | string | Additional context if needed |
{
"summary": "Summarized text here"
}{
"error": "Error message here"
}- URL:
/key_points - Method:
POST - Content-Type:
multipart/form-data
| Key | Type | Description |
|---|---|---|
| text | string | The text from which you want to generate key points |
| context (optional) | string | Additional context if needed |
- URL:
/concept_list - Method:
POST - Content-Type:
multipart/form-data
| Key | Type | Description |
|---|---|---|
| text | string | The text from which you want to generate concept list |
| context (optional) | string | Additional context if needed |
- URL:
/quiz - Method:
POST - Content-Type:
multipart/form-data
| Key | Type | Description |
|---|---|---|
| text | string | The text from which you want to generate the quiz |
| context (optional) | string | Additional context if needed |
| question_count | int | Total number of questions to be generated for the quiz |
You can test the API using tools like Postman:
-
Open Postman
-
Create a new POST request to:
http://127.0.0.1:5000/summarize -
Under the Headers tab, Postman will automatically set
Content-Typewhen using form-data. -
Go to the Body tab:
- Select form-data
- Add a key
text, set its type to Text, and provide the input you want summarized - (Optional) Add a
contextkey if needed
-
Click Send to receive the summarized output.
-
If you get a "Method Not Allowed" error:
- Make sure you're using POST method, not GET
- Check that the URL is correct
-
If you get an "Unsupported Media Type" error:
- Ensure the Content-Type header is set to application/json
- Make sure you're sending raw JSON data, not form-data
ML_Backend/
├── app.py # Main Flask application
├── requirements.txt # Python dependencies
└── text_summarizer/ # Text summarization module
├── __init__.py
└── summarizer.py # Summarization implementation
The Backend is hosted on Glitch and thus no setup is required
- Clone the repository:
cd STT_Backend- Create and activate a virtual environment:
# Windows
python -m venv venv2
.\venv2\Scripts\activate
# Linux/MacOS
python -m venv venv2
source venv2/bin/activate- Install the required dependencies:
The server is running at http://127.0.0.1:5000
- URL:
/upload-audio - Method:
POST - Content-Type:
multipart/form-data
| Key | Type | Description |
|---|---|---|
| audio | File | The audio file you need to send |
- URL:
/list_audios - Method:
GET - Content-Type:
multipart/form-data
- URL:
/speech-to-text-url - Method:
POST - Content-Type:
multipart/form-data
| Key | Type | Description |
|---|---|---|
| data | string | The data to be returned |
| audio-url | string | The url of the audio |
STT_Backend/
├── api.py # Main Flask application and functionality
├── requirements.txt # Python dependencies
├── start.sh # Starting the server