awacke1 commited on
Commit
3aa3963
1 Parent(s): 332d4d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -38,6 +38,7 @@ headers = {
38
  "Authorization": f"Bearer {API_KEY}",
39
  "Content-Type": "application/json"
40
  }
 
41
  prompt = f"Write instructions to teach anyone to write a discharge plan. List the entities, features and relationships to CCDA and FHIR objects in boldface."
42
  # page config and sidebar declares up front allow all other functions to see global class variables
43
  st.set_page_config(page_title="GPT Streamlit Document Reasoner", layout="wide")
@@ -283,7 +284,6 @@ def txt2chunks(text):
283
  return text_splitter.split_text(text)
284
 
285
  def vector_store(text_chunks):
286
- key = os.getenv('OPENAI_KEY')
287
  embeddings = OpenAIEmbeddings(openai_api_key=key)
288
  return FAISS.from_texts(texts=text_chunks, embedding=embeddings)
289
 
 
38
  "Authorization": f"Bearer {API_KEY}",
39
  "Content-Type": "application/json"
40
  }
41
+ key = os.getenv('OPENAI_API_KEY')
42
  prompt = f"Write instructions to teach anyone to write a discharge plan. List the entities, features and relationships to CCDA and FHIR objects in boldface."
43
  # page config and sidebar declares up front allow all other functions to see global class variables
44
  st.set_page_config(page_title="GPT Streamlit Document Reasoner", layout="wide")
 
284
  return text_splitter.split_text(text)
285
 
286
  def vector_store(text_chunks):
 
287
  embeddings = OpenAIEmbeddings(openai_api_key=key)
288
  return FAISS.from_texts(texts=text_chunks, embedding=embeddings)
289