Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import os
|
|
4 |
import bs4
|
5 |
from sentence_transformers import SentenceTransformer
|
6 |
import torch
|
7 |
-
from
|
8 |
from langchain.document_loaders import WebBaseLoader
|
9 |
from langchain.prompts import RunnablePassthrough
|
10 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
@@ -56,8 +56,8 @@ if not use_preprovided_keys:
|
|
56 |
api_key_1 = st.sidebar.text_input("Enter LangChain API Key", type="password", placeholder="Enter your LangChain API Key", help="Please enter a valid LangChain API key here")
|
57 |
api_key_2 = st.sidebar.text_input("Enter Groq API Key", type="password", placeholder="Enter your Groq API Key", help="Please enter your Groq API key here")
|
58 |
else:
|
59 |
-
api_key_1 = "your-preprovided-langchain-api-key"
|
60 |
-
api_key_2 = "your-preprovided-groq-api-key"
|
61 |
st.sidebar.markdown('<p style="color:blue; font-weight:bold;">Using pre-provided API keys</p>', unsafe_allow_html=True)
|
62 |
|
63 |
# Submit button for API keys with a success/warning message
|
|
|
4 |
import bs4
|
5 |
from sentence_transformers import SentenceTransformer
|
6 |
import torch
|
7 |
+
from langchain_groq import ChatGroq # Import from correct package
|
8 |
from langchain.document_loaders import WebBaseLoader
|
9 |
from langchain.prompts import RunnablePassthrough
|
10 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
|
|
56 |
api_key_1 = st.sidebar.text_input("Enter LangChain API Key", type="password", placeholder="Enter your LangChain API Key", help="Please enter a valid LangChain API key here")
|
57 |
api_key_2 = st.sidebar.text_input("Enter Groq API Key", type="password", placeholder="Enter your Groq API Key", help="Please enter your Groq API key here")
|
58 |
else:
|
59 |
+
api_key_1 = "your-preprovided-langchain-api-key"
|
60 |
+
api_key_2 = "your-preprovided-groq-api-key"
|
61 |
st.sidebar.markdown('<p style="color:blue; font-weight:bold;">Using pre-provided API keys</p>', unsafe_allow_html=True)
|
62 |
|
63 |
# Submit button for API keys with a success/warning message
|