Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -137,7 +137,7 @@ def invoke(openai_api_key, rag_option, prompt):
|
|
137 |
db = document_retrieval_mongodb(llm, prompt)
|
138 |
completion = rag_chain(llm, prompt, db)
|
139 |
else:
|
140 |
-
|
141 |
except Exception as e:
|
142 |
raise gr.Error(e)
|
143 |
wandb.config[rag_option] = rag_option
|
@@ -166,7 +166,7 @@ description = """<strong>Overview:</strong> Context-aware multimodal reasoning a
|
|
166 |
<strong>Speech-to-text</strong> via <a href='https://openai.com/research/whisper'>whisper-1</a> model, <strong>text embedding</strong> via
|
167 |
<a href='https://openai.com/blog/new-and-improved-embedding-model'>text-embedding-ada-002</a> model, and <strong>text generation</strong> via
|
168 |
<a href='""" + WEB_URL + """'>gpt-4</a> model. Implementation via AI-first <a href='https://www.langchain.com/'>LangChain</a> toolkit.
|
169 |
-
|
170 |
|
171 |
gr.close_all()
|
172 |
demo = gr.Interface(fn=invoke,
|
|
|
137 |
db = document_retrieval_mongodb(llm, prompt)
|
138 |
completion = rag_chain(llm, prompt, db)
|
139 |
else:
|
140 |
+
completion = llm_chain(llm, prompt)
|
141 |
except Exception as e:
|
142 |
raise gr.Error(e)
|
143 |
wandb.config[rag_option] = rag_option
|
|
|
166 |
<strong>Speech-to-text</strong> via <a href='https://openai.com/research/whisper'>whisper-1</a> model, <strong>text embedding</strong> via
|
167 |
<a href='https://openai.com/blog/new-and-improved-embedding-model'>text-embedding-ada-002</a> model, and <strong>text generation</strong> via
|
168 |
<a href='""" + WEB_URL + """'>gpt-4</a> model. Implementation via AI-first <a href='https://www.langchain.com/'>LangChain</a> toolkit.
|
169 |
+
Performance evaluation via <a href='https://wandb.ai/bstraehle'>Weights & Biases</a>."""
|
170 |
|
171 |
gr.close_all()
|
172 |
demo = gr.Interface(fn=invoke,
|