RoomTempratureWater / Kansei

Notes summarizer and question generator for .md files

Home Page:https://kanseii.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kansei App

Notes summarizer and question generator for .md files.

Use the app at Kansei

  • Motivation

    I use Obsidian to take notes and often while reviewing the notes, i have to go through a lot of text and points and therfore made this tool where i can upload the md files and it will parse the file and generate a summary and questions for each individual heading in the md file generated by obsidin. It works with any .md file but the general format should be headings with some text for ex:
    # Heading
     some text
    - some points
    - more points
    # Next heading 
     etc...
    

Installation

To run this project locally, start by cloning the repo and cd-ing into the project directory, then run:

pip install -r requirements.txt

Supabase

On Supabase, make a new project and create a table called note (you can name it anything but you will have to change the name in the db.py file) Make columns as per Schema below: Schema (Note: Extra columns are for new features to be implemented and can be dropped as of now)

Next create a bucket called MD_files

and copy the Supabaseurl and apikey for you project from project settings

Google

for google login, go to your developer console and setup a OAuth credential.

you can refer to this tutorial.

the client id and redirect uri should be changed in the params field in the login.html file in app/templates.

Huggingface

the models required for the summarizing and question generating are on Huggingface and you will need a api key to accesss it, you have to update your key in the environments variables mentioned below.

Python

Change

uvicorn.run("app.api:app",host="0.0.0.0", port=port, reload=True)

to

uvicorn.run("app.api:app",host="127.0.0.1", port=port, reload=True)

in the main.py file

Deploying

if you want to deploy this to vercel, the config file is in the project and you just have to run: (note:keep the host as 0.0.0.0 for deployment)

vercel .

in the root directory of the project:

.
|--app/
|--main.py
|--requirements.txt
|--vercel.json

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

SUPABASE_URL= "your.supabase.url"
SUPABASE_KEY = "your.supabase.key"
HF = "your.huggingface.api.key"

the .env file should be inside of app/

Features

  • Google Login
  • summarize text for each heading
  • generate questions for point(s) in each heading
  • Cross platform
  • Interactive Ui

Screenshots

WebApp Screenshots WebApp Screenshots WebApp Screenshots

Tech Stack

Client: HTMX

Server: fastapi Jinja2

Contributing

Contributions and suggestions are always welcome!

About

Notes summarizer and question generator for .md files

https://kanseii.vercel.app/


Languages

Language:HTML 82.7%Language:Python 17.3%