Spaces:
Running
Running
Update local changes
Browse files- app.py +1 -1
- seminar_edition_ai.py +6 -0
app.py
CHANGED
@@ -231,6 +231,6 @@ if __name__ == "__main__":
|
|
231 |
|
232 |
embed_model = llmBuilder.getEmbeddingsModel()
|
233 |
#global llmModel
|
234 |
-
|
235 |
|
236 |
demo.launch(share=True)
|
|
|
231 |
|
232 |
embed_model = llmBuilder.getEmbeddingsModel()
|
233 |
#global llmModel
|
234 |
+
|
235 |
|
236 |
demo.launch(share=True)
|
seminar_edition_ai.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
from langchain.docstore.document import Document
|
|
|
2 |
from langchain.chains.question_answering import load_qa_chain
|
3 |
import chromadb
|
4 |
from datetime import datetime
|
@@ -58,6 +59,11 @@ def updatePromptTemplate(
|
|
58 |
):
|
59 |
prompt = PromptTemplate(template = promptTemplate,
|
60 |
input_variables = inputVariablesTemplate)
|
|
|
|
|
|
|
|
|
|
|
61 |
chain = load_qa_chain(
|
62 |
llmModel,
|
63 |
chain_type = "stuff",
|
|
|
1 |
from langchain.docstore.document import Document
|
2 |
+
from llm_call import GeminiLLM
|
3 |
from langchain.chains.question_answering import load_qa_chain
|
4 |
import chromadb
|
5 |
from datetime import datetime
|
|
|
59 |
):
|
60 |
prompt = PromptTemplate(template = promptTemplate,
|
61 |
input_variables = inputVariablesTemplate)
|
62 |
+
|
63 |
+
if llmModel == None:
|
64 |
+
llmBuilder = GeminiLLM()
|
65 |
+
llmModel = llmBuilder.getLLM()
|
66 |
+
|
67 |
chain = load_qa_chain(
|
68 |
llmModel,
|
69 |
chain_type = "stuff",
|