Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: lfoppiano/document-qa
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.4.1
Choose a base ref
...
head repository: lfoppiano/document-qa
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 13 commits
  • 5 files changed
  • 2 contributors

Commits on Jun 25, 2024

  1. Update README.md

    Luca authored and system committed Jun 25, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    6e42b29 View commit details

Commits on Aug 23, 2024

  1. Copy the full SHA
    01ddab3 View commit details
  2. Copy the full SHA
    4e9cd1b View commit details
  3. Copy the full SHA
    848c18f View commit details
  4. update release

    lfoppiano committed Aug 23, 2024
    Copy the full SHA
    d8fb294 View commit details
  5. Copy the full SHA
    a4a1d01 View commit details
  6. Update README.md

    Luca authored and lfoppiano committed Aug 23, 2024
    Copy the full SHA
    99bc866 View commit details
  7. new fix, new release

    lfoppiano committed Aug 23, 2024
    Copy the full SHA
    caaa5c8 View commit details
  8. Merge branch 'main' into main-hf

    # Conflicts:
    #	CHANGELOG.md
    #	streamlit_app.py
    lfoppiano committed Aug 23, 2024
    Copy the full SHA
    da1c929 View commit details
  9. Bump version: 0.4.1 → 0.4.2

    lfoppiano committed Aug 23, 2024
    Copy the full SHA
    eb3f0c5 View commit details
  10. update streamlit sdk to the latest version

    lfoppiano committed Aug 23, 2024
    Copy the full SHA
    28961a5 View commit details

Commits on Nov 21, 2024

  1. update pdf_viewer

    lfoppiano committed Nov 21, 2024
    Copy the full SHA
    0eafdba View commit details
  2. add more embedding functions

    lfoppiano committed Nov 21, 2024
    Copy the full SHA
    5f93f80 View commit details
Showing with 13 additions and 6 deletions.
  1. +5 −0 CHANGELOG.md
  2. +2 −1 README.md
  3. +1 −1 pyproject.toml
  4. +1 −1 requirements.txt
  5. +4 −3 streamlit_app.py
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [0.4.2] - 2024-08-23

### Fixed
+ Correct invalid dependency of promptlayer slipped in the build

## [0.4.1] - 2024-08-23

### Added
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -4,10 +4,11 @@ emoji: 📝
colorFrom: yellow
colorTo: pink
sdk: streamlit
sdk_version: 1.36.0
sdk_version: 1.37.1
app_file: streamlit_app.py
pinned: false
license: apache-2.0
app_port: 8501
---

# DocumentIQA: Scientific Document Insights Q/A
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[tool.bumpversion]
current_version = "0.4.1"
current_version = "0.4.2"
commit = "true"
tag = "true"
tag_name = "v{new_version}"
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -27,6 +27,6 @@ typing-inspect==0.9.0
typing_extensions==4.11.0
pydantic==2.6.4
sentence_transformers==2.6.1
streamlit-pdf-viewer==0.0.18-dev1
streamlit-pdf-viewer==0.0.19
umap-learn
plotly
7 changes: 4 additions & 3 deletions streamlit_app.py
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
import dotenv
from grobid_quantities.quantities import QuantitiesAPI
from langchain.memory import ConversationBufferWindowMemory
from langchain_community.callbacks import PromptLayerCallbackHandler
# from langchain_community.callbacks import PromptLayerCallbackHandler
from langchain_community.chat_models import ChatOpenAI
from langchain_community.llms.huggingface_endpoint import HuggingFaceEndpoint
from langchain_huggingface import HuggingFaceEmbeddings
@@ -43,7 +43,8 @@
'SFR-Embedding-Mistral': 'Salesforce/SFR-Embedding-Mistral',
'SFR-Embedding-2_R': 'Salesforce/SFR-Embedding-2_R',
'NV-Embed': 'nvidia/NV-Embed-v1',
'e5-mistral-7b-instruct': 'intfloat/e5-mistral-7b-instruct'
'e5-mistral-7b-instruct': 'intfloat/e5-mistral-7b-instruct',
'gte-large-en-v1.5': 'Alibaba-NLP/gte-large-en-v1.5'
}

if 'rqa' not in st.session_state:
@@ -174,7 +175,7 @@ def init_qa(model, embeddings_name=None, api_key=None):
temperature=0.01,
max_new_tokens=4092,
model_kwargs={"max_length": 8192},
callbacks=[PromptLayerCallbackHandler(pl_tags=[model, "document-qa"])]
# callbacks=[PromptLayerCallbackHandler(pl_tags=[model, "document-qa"])]
)
embeddings = HuggingFaceEmbeddings(
model_name=OPEN_EMBEDDINGS[embeddings_name])