Spaces:
Sleeping
Sleeping
Update chatbot_rag.py
Browse files- chatbot_rag.py +2 -9
chatbot_rag.py
CHANGED
|
@@ -1,15 +1,8 @@
|
|
| 1 |
-
# -*- coding: utf-8 -*-
|
| 2 |
-
"""chatbot_rag.ipynb
|
| 3 |
|
| 4 |
-
Automatically generated by Colab.
|
| 5 |
-
|
| 6 |
-
Original file is located at
|
| 7 |
-
https://colab.research.google.com/drive/1Qb6RDSuj0-E-Jy6a7bze6Plz9l9e5D_q
|
| 8 |
-
"""
|
| 9 |
|
| 10 |
# rag_pipeline.py
|
| 11 |
-
from
|
| 12 |
-
from
|
| 13 |
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
| 14 |
from langchain.llms import HuggingFacePipeline
|
| 15 |
from langchain.chains import RetrievalQA
|
|
|
|
|
|
|
|
|
|
| 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
# rag_pipeline.py
|
| 4 |
+
from langchain_community.vectorstores import Chroma
|
| 5 |
+
from langchain_community.embeddings import HuggingFaceEmbeddings
|
| 6 |
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
| 7 |
from langchain.llms import HuggingFacePipeline
|
| 8 |
from langchain.chains import RetrievalQA
|