Code Monkey home page Code Monkey logo

code-summarization-tool's Introduction

Code Summarization Tool

Code Summarization Tool Logo

Final Presentation Video Link - https://drive.google.com/file/d/1uauip8CEsvAvflRH6JHCQHHA0yUofBtM/view?usp=sharing

Overview

The Code Summarization Tool is a comprehensive web application designed to facilitate efficient code comprehension for both users and administrators. It offers two distinct views:

User View

For users, the tool provides a seamless experience to enhance code understanding and collaboration. Users can:

  • Register/Login: Access the platform securely to utilize its features.
  • Upload/Input Code: Input code snippets directly or upload code files for summarization.
  • Select Model and Number of Summaries: Choose from available models and specify the desired number of summaries to generate.
  • Generate Summaries: Utilize the tool's summarization capabilities to obtain concise descriptions of code functionality.
  • Rate Summaries Using Feedback: Provide feedback on the generated summaries, ensuring continuous improvement.
  • View Past Feedbacks: Access a history of past feedbacks to track progress and maintain consistency.
  • View Average Ratings: Gain insights into the quality of generated summaries through average ratings.
  • Update Profile Data: Maintain profile information for personalized user experience.

Admin View

Administrators have access to additional functionalities for managing users and overseeing feedback data. Admins can:

  • Register/Login: Access administrative privileges securely.
  • Update Profile: Maintain profile information for administrative purposes.
  • Add New User: Expand the user base by adding new users to the platform.
  • Add New Admin: Enhance administrative capabilities by appointing new administrators.
  • View Feedback Data for Users: Monitor and analyze feedback data provided by users for continuous platform improvement.

Technologies Used

The Code Summarization Tool leverages the following technologies:

  • Frontend: Built using React.js for a dynamic and interactive user interface.
  • Backend: Powered by Python with Flask, providing robust server-side functionality and RESTful API endpoints.
  • Summarization Model: Utilizes OpenAI APIs for advanced code summarization capabilities, enabling the generation of concise and informative summaries from code snippets.
  • Database: Utilizes SQLite for data storage, offering a lightweight and efficient solution for managing user profiles, feedback data, and other application-related information.

Setup Instructions

  1. Clone the repository:
    git clone https://github.com/akshayneema/code-summarization-tool.git
    cd code-summarization-tool
    
  2. Install frontend dependencies
    npm install --force
    
  3. Create and activate a conda environment:
    conda create --name cs520 python=3.9
    conda activate cs520
    
  4. Install server dependencies:
    pip install -r requirements.txt
    

Activate App and Server (Use separate command lines)

  1. Activate Python Server:
    conda activate cs520
    export OPENAI_API_KEY="your_openai_api_key"
    python server/server.py
    
  2. Start React App:
    npm start
    

Access the Web App

You can access the web application in your browser using the following URLs:

Testing Instructions

To ensure the functionality and integrity of the frontend and backend code, we have included tests for both the Flask backend and the React frontend.

  1. Activate the conda environment:

    conda activate cs520
    
  2. Navigate to the project directory:

    cd code-summarization-tool
    
  3. Run the pytest command for backend testing:

    pytest
    
  4. Run the jest command for backend testing:

    npx jest

    or

    npm test

Future Prospects

As the Code Summarization Tool continues to evolve, there are several avenues for future development and enhancement:

  1. Integration of On-premise LLMs: Explore the integration of on-prem LLMs to reduce its dependence on third-party APIs.

  2. Enhanced Feedback Analytics: Implement more insightful ways in which the past feedback from the users can be analyzed and incorporated into improving the tool.

  3. Support for Additional Usecases: In addition to code summarization, include other use cases like syntax error detection, code translation, and many more.

  4. Community Contributions: Encourage contributions from the developer community through open-source collaboration, allowing for continuous improvement and innovation.

code-summarization-tool's People

Contributors

akshayneema avatar keerthykaushik-dasoju avatar anvitha-k avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.