Skip to content

Commit

Permalink
parameterize embedding model and remove streamlit library
Browse files Browse the repository at this point in the history
  • Loading branch information
bilge-ince committed Jul 31, 2024
1 parent 8ae362e commit da3385b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 47 deletions.
1 change: 1 addition & 0 deletions .env-example
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ DB_HOST=localhost
DB_PORT=5432

# MODEl
AIDB_MODEL_NAME=all-MiniLM-L6-v2
MODEL_NAME=mistralai/Mistral-7B-Instruct-v0.2
TOKENIZER_NAME=mistralai/Mistral-7B-Instruct-v0.2
HUGGING_FACE_ACCESS_TOKEN=
6 changes: 3 additions & 3 deletions embedding.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# importing all the required modules
import os
import PyPDF2
from db import get_connection

def generate_embeddings():
conn = get_connection()
cursor = conn.cursor()

cursor.execute("""
cursor.execute(f"""
SELECT aidb.create_pg_retriever(
'documents_embeddings',
'public',
'id',
'all-MiniLM-L6-v2',
'{os.getenv("EMBEDDING_MODEL")}',
'text',
'documents',
ARRAY['id', 'doc_fragment'],
Expand Down
44 changes: 0 additions & 44 deletions streamlit/chatgptui.py

This file was deleted.

Empty file removed streamlit/llamaindex.py
Empty file.

0 comments on commit da3385b

Please sign in to comment.