Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -131,11 +131,11 @@ def wandb_trace(rag_option, prompt, prompt_template, result, completion, chain_n
|
|
131 |
},
|
132 |
start_time_ms = start_time_ms,
|
133 |
end_time_ms = end_time_ms,
|
134 |
-
inputs = {"rag_option": rag_option, "prompt": str(prompt), "prompt_template": str(prompt_template)},
|
135 |
-
outputs = {"result": str(result), "completion": str(completion)},
|
136 |
#model_dict = {"llm": str(llm)}
|
137 |
)
|
138 |
-
trace.log("
|
139 |
wandb.finish()
|
140 |
|
141 |
def invoke(openai_api_key, rag_option, prompt):
|
@@ -205,7 +205,7 @@ description = """<strong>Overview:</strong> Context-aware multimodal reasoning a
|
|
205 |
<strong>Speech-to-text</strong> via <a href='https://openai.com/research/whisper'>whisper-1</a> model, <strong>text embedding</strong> via
|
206 |
<a href='https://openai.com/blog/new-and-improved-embedding-model'>text-embedding-ada-002</a> model, and <strong>text generation</strong> via
|
207 |
<a href='""" + WEB_URL + """'>gpt-4</a> model. Implementation via AI-first <a href='https://www.langchain.com/'>LangChain</a> toolkit.
|
208 |
-
|
209 |
|
210 |
gr.close_all()
|
211 |
demo = gr.Interface(fn=invoke,
|
|
|
131 |
},
|
132 |
start_time_ms = start_time_ms,
|
133 |
end_time_ms = end_time_ms,
|
134 |
+
inputs = {{"rag_option": rag_option}, {"prompt": str(prompt)}, {"prompt_template": str(prompt_template)}},
|
135 |
+
outputs = {{"result": str(result)}, {"completion": str(completion)}},
|
136 |
#model_dict = {"llm": str(llm)}
|
137 |
)
|
138 |
+
trace.log("eval")
|
139 |
wandb.finish()
|
140 |
|
141 |
def invoke(openai_api_key, rag_option, prompt):
|
|
|
205 |
<strong>Speech-to-text</strong> via <a href='https://openai.com/research/whisper'>whisper-1</a> model, <strong>text embedding</strong> via
|
206 |
<a href='https://openai.com/blog/new-and-improved-embedding-model'>text-embedding-ada-002</a> model, and <strong>text generation</strong> via
|
207 |
<a href='""" + WEB_URL + """'>gpt-4</a> model. Implementation via AI-first <a href='https://www.langchain.com/'>LangChain</a> toolkit.
|
208 |
+
Evaluation via <a href='https://wandb.ai/bstraehle/openai-llm-rag/workspace'>Weights & Biases</a>."""
|
209 |
|
210 |
gr.close_all()
|
211 |
demo = gr.Interface(fn=invoke,
|