Git Product home page Git Product logo

azazel0203 / mcq_generator Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 2.0 15 KB

The "MCQ Generator with Streamlit" web app utilizes OpenAI's language models to create multiple-choice questions (MCQs) from uploaded PDF or text files. Users can customize question parameters like quantity, subject, and tone. The app offers real-time complexity feedback and presents MCQs in an easy-to-read tabular format.

Home Page: https://mcqgenerator-aadarsh.streamlit.app/

Python 100.00%
json langchain llm openai pypdf2 streamlit

mcq_generator's Introduction

MCQ Generator with Streamlit

MCQ Generator with Streamlit is a web application that allows users to upload PDF or text files, specify the number of questions, subject, and tone, and generate multiple-choice questions (MCQs) based on the provided input. The application utilizes OpenAI's language models for natural language processing and provides feedback on the complexity of the generated quiz.

Features

  • File Upload: Users can upload PDF or text files containing the text from which MCQs will be generated.
  • Dynamic Inputs: Users can specify the number of questions, subject, and tone for the generated MCQs.
  • Real-time Feedback: Provides real-time feedback on the complexity of the generated quiz and suggests improvements.
  • Tabular Display: Displays the generated MCQs in a tabular format for easy readability.

Prerequisites

  • Python 3.x
  • Streamlit library
  • Langchain library
  • OpenAI API Key

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/mcq-generator-streamlit.git
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Set up environment variables:

    • Create a .env file in the root directory.

    • Add your OpenAI API key to the .env file:

      OPEN_AI_KEY=your-openai-api-key
      
  4. Install the local package in the virtual environment:

    python setup.py install

Usage

  1. Run the Streamlit application:

    streamlit run main.py
  2. Access the application in your web browser.

  3. Upload a PDF or text file, specify the number of questions, subject, and tone, and click the "Create MCQs" button.

  4. View the generated MCQs and the review feedback provided.

Logging

  • All logs are stored in the logs directory.
  • Each log file is named with a timestamp indicating when it was created.

mcq_generator's People

Contributors

azazel0203 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  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.