Skip to content

πŸ“š This Streamlit app, powered by Google GEMINI 1.5 Pro, crafts comprehension exercises based on user input. πŸš€ Deployed on AWS, it ensures accessibility and scalability while facilitating offline content downloads.

License

Notifications You must be signed in to change notification settings

Deepmalya-Rakshit/CompreHive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Logo

CompreHive

Enhance understanding effortlessly with customized reading passages and questions
View Demo Β· Report Bug Β· Request Feature

Table of Contents

  1. Project Overview
  2. Project Demo
  3. Required API Keys
  4. Project Setup
  5. Deployment on AWS
  6. Dependencies
  7. Author

Project Overview

This Streamlit application, powered by Google GEMINI 1.5 Pro, generates comprehension exercises based on user input of topics, keywords, and desired question types. Users have the flexibility to specify the number of multiple-choice, short-answer, and long-answer questions according to their preferences. Moreover, users can conveniently download the generated content in the form of text and PDF files, enhancing accessibility and offline usage.

The application incorporates robust logging and exception handling mechanisms to ensure smooth operation and error detection. Additionally, a setup module is implemented to streamline the installation process and manage dependencies effectively.

Deployed on Amazon Web Services (AWS), the application offers easy access and utilization for users. AWS also ensures scalability, allowing the application to handle varying user loads seamlessly.

Project Demo

  • App Recording
App.Recording.mp4

  • Text File Screenshot
Text-screenshot

  • PDF File Screenshot
PDF-screenshot

Required API Keys

This project requires two API keys:

  • Google API key: Required for accessing the GEMINI 1.5 Pro model.
  • LangChain API key: Required for LangSmith tracking.

LangSmith facilitates usage tracking and provides valuable insights into user behavior through seamless integration. The screenshot below illustrates a sample view of CompreHive usage data within the LangSmith platform.

App Screenshot

Ensure that you obtain these API keys before running the project.

Project Setup

Clone this GitHub repository

(base)$: git clone https://github.com/Deepmalya-Rakshit/CompreHive.git

Go to the project directory

(base)$: cd CompreHive

Configure environment

  • Create the conda environment
(base)$: conda  create -p venv python==3.10 -y
  • Activate the environment
(base)$: conda activate venv
  • Install the required dependencies
(venv)$: pip install -r requirements.txt

Run it

(venv)$: streamlit run app.py

As soon as you run the script, a local Streamlit server will spin up, and your app will open in a new tab in your default web browser.

Or you can navigate to http://localhost:8501.

Deployment on AWS

Step 1

First login to the AWS: https://aws.amazon.com/console/

Step 2

Search about EC2 in the services section.

Step 3

Configure the Ubuntu machine.

Step 4

Launch the instance.

Step 5

Do the port mapping to this port: 8501

Step 6

Run the following commands.

sudo apt update
sudo apt-get update
sudo apt upgrade -y
sudo apt install git curl unzip tar make sudo vim wget -y
git clone https://github.com/Deepmalya-Rakshit/CompreHive.git
cd CompreHive
sudo apt install python3-pip
sudo apt install python3-venv
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt

If you want to add the API keys

  • Create .env file in the AWS server using touch .env

  • Next write vi .env

  • Press i

  • Copy API keys and paste it

  • Press : , then wq! and hit enter

Step 7

#Temporary running
python3 -m streamlit run app.py
#Permanent running
nohup python3 -m streamlit run app.py

Dependencies

  • langchain
  • langchain-core
  • langchain-google-genai
  • python-dotenv
  • reportlab
  • streamlit

Author

Deepmalya Rakshit

Β© 2024 CompreHive by Deepmalya Rakshit

Back to Top

About

πŸ“š This Streamlit app, powered by Google GEMINI 1.5 Pro, crafts comprehension exercises based on user input. πŸš€ Deployed on AWS, it ensures accessibility and scalability while facilitating offline content downloads.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages