Nior Sayson
commited on
Commit
·
bd61486
1
Parent(s):
e4a8f4d
Update app.py with latest changes
Browse files
app.py
CHANGED
|
@@ -1,15 +1,17 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import os
|
| 3 |
import requests
|
|
|
|
| 4 |
import re # To help clean up leading whitespace
|
| 5 |
|
| 6 |
# Langchain and HuggingFace
|
| 7 |
from langchain_community.vectorstores import Chroma
|
| 8 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
| 9 |
from langchain_groq import ChatGroq
|
| 10 |
-
from langchain.chains
|
| 11 |
|
| 12 |
# Load the .env file (if using it)
|
|
|
|
| 13 |
groq_api_key = os.getenv("GROQ_API_KEY")
|
| 14 |
|
| 15 |
# Load embeddings, model, and vector store
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import os
|
| 3 |
import requests
|
| 4 |
+
from dotenv import load_dotenv # Only needed if using a .env file
|
| 5 |
import re # To help clean up leading whitespace
|
| 6 |
|
| 7 |
# Langchain and HuggingFace
|
| 8 |
from langchain_community.vectorstores import Chroma
|
| 9 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
| 10 |
from langchain_groq import ChatGroq
|
| 11 |
+
from langchain.chains import RetrievalQA
|
| 12 |
|
| 13 |
# Load the .env file (if using it)
|
| 14 |
+
load_dotenv()
|
| 15 |
groq_api_key = os.getenv("GROQ_API_KEY")
|
| 16 |
|
| 17 |
# Load embeddings, model, and vector store
|