tyang4 commited on
Commit
14b1d1d
·
verified ·
1 Parent(s): 5650eed

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +6 -5
src/streamlit_app.py CHANGED
@@ -22,10 +22,11 @@ import textwrap
22
  import requests
23
 
24
  # ============================== CONFIGURATION ==============================
25
- NEO4J_URI = os.getenv["NEO4J_URI"]
26
- NEO4J_USERNAME = os.getenv["NEO4J_USERNAME"]
27
- NEO4J_PASSWORD = os.getenv["NEO4J_PASSWORD"]
28
- openai.api_key = os.getenv["openai_api_key"]
 
29
  os.environ["TRANSFORMERS_CACHE"] = "/tmp/hf_cache"
30
  # ============================== DOWNLOAD ==============================
31
  def download_if_missing(url, local_path):
@@ -265,7 +266,7 @@ Return your response strictly as a **JSON object** with the following fields:
265
 
266
  Do not include any explanation or commentary—only return the JSON object.
267
  """
268
- client = openai.OpenAI(api_key=os.getenv["openai_api_key"])
269
  response = client.chat.completions.create(
270
  model="gpt-4o",
271
  messages=[{"role": "user", "content": prompt}],
 
22
  import requests
23
 
24
  # ============================== CONFIGURATION ==============================
25
+ NEO4J_URI = os.getenv("NEO4J_URI")
26
+ NEO4J_USERNAME = os.getenv("NEO4J_USERNAME")
27
+ NEO4J_PASSWORD = os.getenv("NEO4J_PASSWORD")
28
+ openai.api_key = os.getenv("OPENAI_API_KEY")
29
+
30
  os.environ["TRANSFORMERS_CACHE"] = "/tmp/hf_cache"
31
  # ============================== DOWNLOAD ==============================
32
  def download_if_missing(url, local_path):
 
266
 
267
  Do not include any explanation or commentary—only return the JSON object.
268
  """
269
+ client = openai.OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
270
  response = client.chat.completions.create(
271
  model="gpt-4o",
272
  messages=[{"role": "user", "content": prompt}],