bstraehle commited on
Commit
e64fbab
·
1 Parent(s): 37ab520

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -20,7 +20,6 @@ from dotenv import load_dotenv, find_dotenv
20
  _ = load_dotenv(find_dotenv())
21
 
22
  WANDB_API_KEY = os.environ["WANDB_API_KEY"]
23
- os.environ["WANDB_PROJECT"] = "openai-llm-rag"
24
 
25
  MONGODB_URI = os.environ["MONGODB_ATLAS_CLUSTER_URI"]
26
  client = MongoClient(MONGODB_URI)
@@ -121,6 +120,7 @@ def invoke(openai_api_key, rag_option, prompt):
121
  raise gr.Error("Retrieval Augmented Generation is required.")
122
  if (prompt == ""):
123
  raise gr.Error("Prompt is required.")
 
124
  os.environ["LANGCHAIN_WANDB_TRACING"] = "true"
125
  completion = ""
126
  try:
@@ -147,6 +147,7 @@ def invoke(openai_api_key, rag_option, prompt):
147
  finally:
148
  wandb.finish()
149
  del os.environ["LANGCHAIN_WANDB_TRACING"]
 
150
  return completion
151
 
152
  description = """<strong>Overview:</strong> Context-aware multimodal reasoning application using a <strong>large language model (LLM)</strong> with
 
20
  _ = load_dotenv(find_dotenv())
21
 
22
  WANDB_API_KEY = os.environ["WANDB_API_KEY"]
 
23
 
24
  MONGODB_URI = os.environ["MONGODB_ATLAS_CLUSTER_URI"]
25
  client = MongoClient(MONGODB_URI)
 
120
  raise gr.Error("Retrieval Augmented Generation is required.")
121
  if (prompt == ""):
122
  raise gr.Error("Prompt is required.")
123
+ os.environ["WANDB_PROJECT"] = "openai-llm-rag"
124
  os.environ["LANGCHAIN_WANDB_TRACING"] = "true"
125
  completion = ""
126
  try:
 
147
  finally:
148
  wandb.finish()
149
  del os.environ["LANGCHAIN_WANDB_TRACING"]
150
+ del os.environ["WANDB_PROJECT"]
151
  return completion
152
 
153
  description = """<strong>Overview:</strong> Context-aware multimodal reasoning application using a <strong>large language model (LLM)</strong> with