Git Product home page Git Product logo

paperqa-ui's Introduction

PaperQA UI

This project lets users explore arXiv papers with the following features powered by large language model(LLM):

  • exploring collected papers.
  • searching collected paper with auto-complete, but also by year, month, and day.
  • reading (question, answer) pairs smoothly.
  • requesting to generate (question, answer) pairs of specified arXiv IDs.
  • chatting directly about each paper. Each chat history per paper is managed permanently on in-browser local storage.

Instructions

  1. Prerequisites

    • Currently, the underlying LLM is Google's Gemini 1.0 Pro. This is due to the context size problem. Most of the existing open source large language models' context length is small. But, if you wish, you can try out since the codebase for interacting with Text Generation Infrerence is already integrated (tested with mistralai/Mistral-7B-Instruct-v0.2 and meta-llama/Llama-2-70b-hf).

    • Sign-up Google AI Studio and grasp your own API Key. For personal use, the free version should be sufficient (60 message per minute).

    • Sign-up Hugging Face and grasp your own Access Token. It will be used to create and modify Dataset repository. After all, PaperQA UI manages underlying data (generated Q&As and arXiv ID requests) in Hugging Face Hub.

  2. Install the dependencies

    $ pip install -r requirements.txt
  3. Setup environment variables

    $ export GEMINI_API_KEY="<GEMINI-API-KEY-ON-GOOGLE-AI-STUDIO>"
    $ export HF_TOKEN="<HUGGINGFACE-ACCESS-TOKEN>"
    $ export SOURCE_DATA_REPO_ID="..."
    $ export REQUEST_DATA_REPO_ID="..."
    $ export RESTART_TARGET_SPACE_REPO_ID="..."
    • SOURCE_DATA_REPO_ID and REQUEST_DATA_REPO_ID are the IDs of Hugging Face Dataset repository. Name them like <YOUR-ACCOUNT-ID>/<WHATEVER-NAME-YOUR-LIKE>. At first, it will create the repositories automatically, then update them afterwards.

    • RESTART_TARGET_SPACE_REPO_ID is the ID of Hugging Face Space repository. If you are running this app on a local machine, you can ignore this. If you are running this app on Hugging Face Space, specify the Space repository ID here. When a chunk of automated Q&A generation is finished, the Space will be automatically restarted.

    To reflect updated data from SOURCE_DATA_REPO_ID, you need to restart this application.

  4. Run the application

    $ python app.py

    If you are curious how this application works in action, please visit Hugging Face Space that I am hosting this app on [LINK].

Todos

  • more LLM support (ChatGPT4, ...)
  • RAG system (now PaperQA UI simply inject 30000 characters of the entire paper in chatting mode)
  • ...

Acknowledgements

This is a project built during the Gemini sprint held by Google's ML Developer Programs team. I am thankful to be granted good amount of GCP credits to finish up this project.

paperqa-ui's People

Contributors

deep-diver 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.