Spaces:
Sleeping
Sleeping
ShantanuD
commited on
Commit
·
3525e4a
1
Parent(s):
50bdeb1
Retriever Made
Browse files- README.md +2 -2
- app.py +6 -9
- requirements.txt +9 -7
README.md
CHANGED
@@ -3,8 +3,8 @@ title: Shantanu Datta Wikipedia
|
|
3 |
emoji: 💬
|
4 |
colorFrom: yellow
|
5 |
colorTo: purple
|
6 |
-
sdk:
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: apache-2.0
|
|
|
3 |
emoji: 💬
|
4 |
colorFrom: yellow
|
5 |
colorTo: purple
|
6 |
+
sdk: streamlit
|
7 |
+
sdk_version: 1.35.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: apache-2.0
|
app.py
CHANGED
@@ -1,14 +1,11 @@
|
|
1 |
import streamlit as st
|
2 |
-
|
3 |
-
from
|
4 |
-
from
|
5 |
-
from
|
6 |
-
from
|
7 |
from langchain.schema import HumanMessage
|
8 |
-
import
|
9 |
-
|
10 |
-
# Optional: For Cohere reranking
|
11 |
-
import cohere
|
12 |
|
13 |
# --- Load and Prepare Dataset (run once and cache)
|
14 |
@st.cache_resource
|
|
|
1 |
import streamlit as st
|
2 |
+
import time
|
3 |
+
from langchain_community.vectorstores import Chroma
|
4 |
+
from langchain_community.embeddings import BedrockEmbeddings
|
5 |
+
from langchain_community.chat_models import ChatBedrock
|
6 |
+
from langchain_core.documents import Document
|
7 |
from langchain.schema import HumanMessage
|
8 |
+
from datasets import load_dataset
|
|
|
|
|
|
|
9 |
|
10 |
# --- Load and Prepare Dataset (run once and cache)
|
11 |
@st.cache_resource
|
requirements.txt
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
huggingface_hub==0.25.2
|
2 |
-
streamlit
|
3 |
-
langchain
|
4 |
-
langchain-
|
5 |
-
langchain-
|
6 |
-
|
7 |
-
|
8 |
-
boto3
|
|
|
|
|
|
1 |
huggingface_hub==0.25.2
|
2 |
+
streamlit==1.32.2
|
3 |
+
langchain==0.2.1
|
4 |
+
langchain-core==0.1.48
|
5 |
+
langchain-community==0.0.38
|
6 |
+
langchain-aws==0.1.6
|
7 |
+
chromadb==0.4.24
|
8 |
+
boto3==1.34.82
|
9 |
+
datasets==2.18.0
|
10 |
+
cohere==5.3.3 # Only if you're using cohere reranker
|