Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -128,6 +128,8 @@ def invoke(openai_api_key, rag_option, prompt):
|
|
128 |
if (prompt == ""):
|
129 |
raise gr.Error("Prompt is required.")
|
130 |
completion = ""
|
|
|
|
|
131 |
try:
|
132 |
llm = ChatOpenAI(model_name = config["model"],
|
133 |
openai_api_key = openai_api_key,
|
@@ -150,7 +152,8 @@ def invoke(openai_api_key, rag_option, prompt):
|
|
150 |
completion = e
|
151 |
raise gr.Error(e)
|
152 |
finally:
|
153 |
-
wandb_log(prompt, completion, rag_option)
|
|
|
154 |
return completion
|
155 |
|
156 |
description = """<strong>Overview:</strong> Context-aware multimodal reasoning application using a <strong>large language model (LLM)</strong> with
|
|
|
128 |
if (prompt == ""):
|
129 |
raise gr.Error("Prompt is required.")
|
130 |
completion = ""
|
131 |
+
wandb.login(key = wandb_api_key)
|
132 |
+
autolog({"project": "openai-llm-rag"})
|
133 |
try:
|
134 |
llm = ChatOpenAI(model_name = config["model"],
|
135 |
openai_api_key = openai_api_key,
|
|
|
152 |
completion = e
|
153 |
raise gr.Error(e)
|
154 |
finally:
|
155 |
+
#wandb_log(prompt, completion, rag_option)
|
156 |
+
wandb.finish()
|
157 |
return completion
|
158 |
|
159 |
description = """<strong>Overview:</strong> Context-aware multimodal reasoning application using a <strong>large language model (LLM)</strong> with
|