Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import streamlit as st
|
|
|
2 |
from transformers import AutoModel
|
3 |
from pinecone import Pinecone
|
4 |
import os # For environment variable access
|
@@ -11,7 +12,7 @@ API_KEY = os.environ.get("PINECONE_API_KEY")
|
|
11 |
pc = Pinecone(api_key=API_KEY)
|
12 |
|
13 |
# Load pre-trained model (replace with your chosen model)
|
14 |
-
model =
|
15 |
|
16 |
def process_and_search(query):
|
17 |
# Preprocess user input (example: tokenization, normalization)
|
|
|
1 |
import streamlit as st
|
2 |
+
from langchain.embeddings.sentence_transformer import SentenceTransformerEmbeddings
|
3 |
from transformers import AutoModel
|
4 |
from pinecone import Pinecone
|
5 |
import os # For environment variable access
|
|
|
12 |
pc = Pinecone(api_key=API_KEY)
|
13 |
|
14 |
# Load pre-trained model (replace with your chosen model)
|
15 |
+
model =SentenceTransformerEmbeddings(model_name="all-MiniLM-L6-v2")
|
16 |
|
17 |
def process_and_search(query):
|
18 |
# Preprocess user input (example: tokenization, normalization)
|