Jorge Londoño commited on
Commit ·
1df5013
1
Parent(s): 3026b25
Tested on linux environment
Browse files- .gitignore +1 -0
- app02-chatRagLcel.py +4 -0
- app03-chatRagLcelMem.py +4 -0
- modules.md +6 -3
- requirements.txt +151 -150
- test.py +6 -0
.gitignore
CHANGED
|
@@ -1,3 +1,4 @@
|
|
| 1 |
.env
|
| 2 |
.venv
|
| 3 |
flagged
|
|
|
|
|
|
| 1 |
.env
|
| 2 |
.venv
|
| 3 |
flagged
|
| 4 |
+
__pycache__
|
app02-chatRagLcel.py
CHANGED
|
@@ -25,6 +25,10 @@ from langchain_groq import ChatGroq
|
|
| 25 |
from pinecone import Pinecone, ServerlessSpec
|
| 26 |
from langchain_pinecone import PineconeVectorStore
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
setid = "global"
|
| 30 |
|
|
|
|
| 25 |
from pinecone import Pinecone, ServerlessSpec
|
| 26 |
from langchain_pinecone import PineconeVectorStore
|
| 27 |
|
| 28 |
+
from dotenv import load_dotenv
|
| 29 |
+
load_dotenv()
|
| 30 |
+
# print('EMBEDDINGS_MODEL', os.getenv("EMBEDDINGS_MODEL"))
|
| 31 |
+
|
| 32 |
|
| 33 |
setid = "global"
|
| 34 |
|
app03-chatRagLcelMem.py
CHANGED
|
@@ -25,6 +25,10 @@ from langchain_groq import ChatGroq
|
|
| 25 |
from pinecone import Pinecone, ServerlessSpec
|
| 26 |
from langchain_pinecone import PineconeVectorStore
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
setid = "global"
|
| 30 |
|
|
|
|
| 25 |
from pinecone import Pinecone, ServerlessSpec
|
| 26 |
from langchain_pinecone import PineconeVectorStore
|
| 27 |
|
| 28 |
+
from dotenv import load_dotenv
|
| 29 |
+
load_dotenv()
|
| 30 |
+
# print('EMBEDDINGS_MODEL', os.getenv("EMBEDDINGS_MODEL"))
|
| 31 |
+
|
| 32 |
|
| 33 |
setid = "global"
|
| 34 |
|
modules.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
| 1 |
```sh
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
pip install ipykernel IProgress ipywidgets --upgrade
|
| 4 |
|
| 5 |
pip install \
|
|
@@ -10,9 +14,8 @@ pip install \
|
|
| 10 |
langchain-pinecone \
|
| 11 |
huggingface_hub
|
| 12 |
|
| 13 |
-
# Groq API
|
| 14 |
-
pip install
|
| 15 |
-
pip install langsmith
|
| 16 |
|
| 17 |
|
| 18 |
|
|
|
|
| 1 |
```sh
|
| 2 |
|
| 3 |
+
python3.11 -m venv .venv
|
| 4 |
+
source .venv/bin/activate
|
| 5 |
+
python -m pip install pip setuptools wheel --upgrade
|
| 6 |
+
|
| 7 |
pip install ipykernel IProgress ipywidgets --upgrade
|
| 8 |
|
| 9 |
pip install \
|
|
|
|
| 14 |
langchain-pinecone \
|
| 15 |
huggingface_hub
|
| 16 |
|
| 17 |
+
pip install langchain_groq # Groq API
|
| 18 |
+
pip install langsmith # LangSmith
|
|
|
|
| 19 |
|
| 20 |
|
| 21 |
|
requirements.txt
CHANGED
|
@@ -1,158 +1,159 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
decorator==5.1.1
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
langchain-community==0.0.24
|
| 64 |
-
langchain-core==0.1.26
|
| 65 |
-
langchain-google-genai==0.0.9
|
| 66 |
-
langchain-groq==0.0.1
|
| 67 |
-
langchain-pinecone==0.0.3
|
| 68 |
-
langsmith==0.1.7
|
| 69 |
-
markdown-it-py==3.0.0
|
| 70 |
-
MarkupSafe==2.1.5
|
| 71 |
-
marshmallow==3.20.2
|
| 72 |
-
matplotlib==3.8.3
|
| 73 |
matplotlib-inline==0.1.6
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
nest-asyncio==1.
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
nvidia-curand-cu12==10.3.2.106
|
| 88 |
-
nvidia-cusolver-cu12==11.4.5.107
|
| 89 |
-
nvidia-cusparse-cu12==12.1.0.106
|
| 90 |
-
nvidia-nccl-cu12==2.19.3
|
| 91 |
-
nvidia-nvjitlink-cu12==12.3.101
|
| 92 |
-
nvidia-nvtx-cu12==12.1.105
|
| 93 |
-
orjson==3.9.15
|
| 94 |
-
packaging==23.2
|
| 95 |
-
pandas==2.2.1
|
| 96 |
parso==0.8.3
|
| 97 |
-
pexpect==4.
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
platformdirs==
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
protobuf==
|
| 104 |
-
psutil==5.9.
|
| 105 |
ptyprocess==0.7.0
|
| 106 |
pure-eval==0.2.2
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
python-dateutil==2.8.2
|
| 115 |
-
python-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
|
|
|
| 132 |
six==1.16.0
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
tomlkit==0.12.0
|
| 142 |
-
toolz==0.12.1
|
| 143 |
-
torch==2.2.1
|
| 144 |
-
tornado==6.4
|
| 145 |
-
tqdm==4.66.2
|
| 146 |
-
traitlets==5.14.1
|
| 147 |
-
transformers==4.38.1
|
| 148 |
-
triton==2.2.0
|
| 149 |
-
typer==0.9.0
|
| 150 |
-
typing-inspect==0.9.0
|
| 151 |
typing_extensions==4.9.0
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
algs4==1.0.3
|
| 2 |
+
appdirs==1.4.4
|
| 3 |
+
apt-clone==0.2.1
|
| 4 |
+
apturl==0.5.2
|
| 5 |
+
asttokens==2.2.1
|
| 6 |
+
async-timeout==4.0.1
|
| 7 |
+
attrs==22.1.0
|
| 8 |
+
backcall==0.2.0
|
| 9 |
+
beautifulsoup4==4.12.0
|
| 10 |
+
blinker==1.4
|
| 11 |
+
Brlapi==0.8.3
|
| 12 |
+
Brotli==1.0.9
|
| 13 |
+
certifi==2020.6.20
|
| 14 |
+
chardet==4.0.0
|
| 15 |
+
charset-normalizer==3.1.0
|
| 16 |
+
click==8.0.3
|
| 17 |
+
colorama==0.4.4
|
| 18 |
+
comm==0.1.3
|
| 19 |
+
command-not-found==0.3
|
| 20 |
+
configobj==5.0.6
|
| 21 |
+
contourpy==1.0.7
|
| 22 |
+
cramjam==2.6.2
|
| 23 |
+
crudini==0.9.3
|
| 24 |
+
cryptography==3.4.8
|
| 25 |
+
cupshelpers==1.0
|
| 26 |
+
cycler==0.11.0
|
| 27 |
+
dbus-python==1.2.18
|
| 28 |
+
debugpy==1.6.6
|
| 29 |
decorator==5.1.1
|
| 30 |
+
defer==1.0.6
|
| 31 |
+
diskcache==5.6.3
|
| 32 |
+
distro==1.7.0
|
| 33 |
+
dnspython==2.3.0
|
| 34 |
+
entrypoints==0.4
|
| 35 |
+
exceptiongroup==1.0.0
|
| 36 |
+
executing==1.2.0
|
| 37 |
+
eyeD3==0.8.10
|
| 38 |
+
fastparquet==2023.4.0
|
| 39 |
+
filelock==3.6.0
|
| 40 |
+
fonttools==4.39.3
|
| 41 |
+
frozendict==2.3.6
|
| 42 |
+
fsspec==2023.5.0
|
| 43 |
+
gpg==1.16.0
|
| 44 |
+
grpcio==1.30.2
|
| 45 |
+
html5lib==1.1
|
| 46 |
+
httplib2==0.20.2
|
| 47 |
+
idna==3.3
|
| 48 |
+
ifaddr==0.1.7
|
| 49 |
+
IMDbPY==2021.4.18
|
| 50 |
+
importlib-metadata==4.6.4
|
| 51 |
+
iniconfig==1.1.1
|
| 52 |
+
iniparse==0.4
|
| 53 |
+
introcs==1.0
|
| 54 |
+
ipykernel==6.22.0
|
| 55 |
+
ipython==8.11.0
|
| 56 |
+
jedi==0.18.2
|
| 57 |
+
jeepney==0.7.1
|
| 58 |
+
jupyter_client==8.1.0
|
| 59 |
+
jupyter_core==5.3.0
|
| 60 |
+
keyring==23.5.0
|
| 61 |
+
kiwisolver==1.4.4
|
| 62 |
+
launchpadlib==1.10.16
|
| 63 |
+
lazr.restfulclient==0.14.4
|
| 64 |
+
lazr.uri==1.0.6
|
| 65 |
+
llama_cpp_python==0.2.23
|
| 66 |
+
louis==3.20.0
|
| 67 |
+
lxml==4.9.2
|
| 68 |
+
macaroonbakery==1.3.1
|
| 69 |
+
Mako==1.1.3
|
| 70 |
+
MarkupSafe==2.0.1
|
| 71 |
+
matplotlib==3.7.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
matplotlib-inline==0.1.6
|
| 73 |
+
more-itertools==8.10.0
|
| 74 |
+
multitasking==0.0.11
|
| 75 |
+
mutagen==1.45.1
|
| 76 |
+
nemo-emblems==6.0.1
|
| 77 |
+
nest-asyncio==1.5.6
|
| 78 |
+
netaddr==0.8.0
|
| 79 |
+
netifaces==0.11.0
|
| 80 |
+
numpy==1.26.2
|
| 81 |
+
oauthlib==3.2.0
|
| 82 |
+
onboard==1.4.1
|
| 83 |
+
packaging==21.3
|
| 84 |
+
PAM==0.4.2
|
| 85 |
+
pandas==1.5.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
parso==0.8.3
|
| 87 |
+
pexpect==4.8.0
|
| 88 |
+
pickleshare==0.7.5
|
| 89 |
+
Pillow==9.0.1
|
| 90 |
+
platformdirs==3.2.0
|
| 91 |
+
pluggy==1.0.0
|
| 92 |
+
prompt-toolkit==3.0.38
|
| 93 |
+
protobuf==3.12.4
|
| 94 |
+
psutil==5.9.0
|
| 95 |
ptyprocess==0.7.0
|
| 96 |
pure-eval==0.2.2
|
| 97 |
+
pyarrow==12.0.0
|
| 98 |
+
pycairo==1.20.1
|
| 99 |
+
pycryptodomex==3.11.0
|
| 100 |
+
pycups==2.0.1
|
| 101 |
+
pycurl==7.44.1
|
| 102 |
+
pyelftools==0.27
|
| 103 |
+
pygame==2.1.3
|
| 104 |
+
Pygments==2.14.0
|
| 105 |
+
PyGObject==3.42.1
|
| 106 |
+
PyICU==2.8.1
|
| 107 |
+
pyinotify==0.9.6
|
| 108 |
+
PyJWT==2.3.0
|
| 109 |
+
pymacaroons==0.13.0
|
| 110 |
+
PyNaCl==1.5.0
|
| 111 |
+
pyparsing==2.4.7
|
| 112 |
+
pyparted==3.11.7
|
| 113 |
+
pyRFC3339==1.1
|
| 114 |
+
pytest==7.2.0
|
| 115 |
+
python-apt==2.4.0+ubuntu3
|
| 116 |
python-dateutil==2.8.2
|
| 117 |
+
python-debian==0.1.43+ubuntu1.1
|
| 118 |
+
python-gnupg==0.4.8
|
| 119 |
+
python-magic==0.4.24
|
| 120 |
+
python-xlib==0.29
|
| 121 |
+
pytz==2023.3
|
| 122 |
+
pyxattr==0.7.2
|
| 123 |
+
pyxdg==0.27
|
| 124 |
+
PyYAML==5.4.1
|
| 125 |
+
pyzmq==25.0.2
|
| 126 |
+
qrcode==7.3.1
|
| 127 |
+
reportlab==3.6.8
|
| 128 |
+
requests==2.28.2
|
| 129 |
+
requests-file==1.5.1
|
| 130 |
+
requests-unixsocket==0.2.0
|
| 131 |
+
screen-resolution-extra==0.0.0
|
| 132 |
+
SecretStorage==3.3.1
|
| 133 |
+
setproctitle==1.2.2
|
| 134 |
+
simplejson==3.17.6
|
| 135 |
six==1.16.0
|
| 136 |
+
soupsieve==2.3.1
|
| 137 |
+
stack-data==0.6.2
|
| 138 |
+
systemd-python==234
|
| 139 |
+
tinycss2==1.1.1
|
| 140 |
+
tldextract==3.1.2
|
| 141 |
+
tomli==2.0.1
|
| 142 |
+
tornado==6.2
|
| 143 |
+
traitlets==5.9.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
typing_extensions==4.9.0
|
| 145 |
+
ubuntu-drivers-common==0.0.0
|
| 146 |
+
ufw==0.36.1
|
| 147 |
+
Unidecode==1.3.3
|
| 148 |
+
urllib3==1.26.5
|
| 149 |
+
vboxapi==1.0
|
| 150 |
+
wadllib==1.3.6
|
| 151 |
+
wcwidth==0.2.6
|
| 152 |
+
webencodings==0.5.1
|
| 153 |
+
websockets==9.1
|
| 154 |
+
xdg==5
|
| 155 |
+
xkit==0.0.0
|
| 156 |
+
xlrd==1.2.0
|
| 157 |
+
yfinance==0.2.14
|
| 158 |
+
yt-dlp==2022.4.8
|
| 159 |
+
zipp==1.0.0
|
test.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import gradio as gr
|
| 3 |
+
from dotenv import load_dotenv
|
| 4 |
+
|
| 5 |
+
load_dotenv()
|
| 6 |
+
print('EMBEDDINGS_MODEL', os.getenv("EMBEDDINGS_MODEL"))
|