LordFarquaad42 commited on
Commit
24aab2e
·
1 Parent(s): 5cb3e42

app.py now reflects new chroma class

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,11 +1,11 @@
1
  import streamlit as st
2
  from openai import OpenAI
3
  from params import params
4
- from database import get_client
5
 
6
  # from add_data import start_troggin_off, create_client
7
 
8
- CLIENT = get_client()
9
  APP_NAME: str = "Groove-GPT"
10
  history = []
11
  st.set_page_config(layout="wide")
@@ -50,8 +50,8 @@ with l_col:
50
  openai_client = OpenAI(api_key=access_key)
51
 
52
  with st.spinner("Loading..."):
53
- # Perform the Chromadb query.
54
- results = CLIENT.query(
55
  query_texts=[user_question],
56
  n_results=num_samples,
57
  include=["documents"],
 
1
  import streamlit as st
2
  from openai import OpenAI
3
  from params import params
4
+ from Chroma import Chroma
5
 
6
  # from add_data import start_troggin_off, create_client
7
 
8
+ CLIENT = Chroma()
9
  APP_NAME: str = "Groove-GPT"
10
  history = []
11
  st.set_page_config(layout="wide")
 
50
  openai_client = OpenAI(api_key=access_key)
51
 
52
  with st.spinner("Loading..."):
53
+ collection = CLIENT.get_collection()
54
+ results = collection.query(
55
  query_texts=[user_question],
56
  n_results=num_samples,
57
  include=["documents"],