Spaces:
Sleeping
Sleeping
Update local changes
Browse files- seminar_edition_ai.py +4 -1
seminar_edition_ai.py
CHANGED
@@ -11,11 +11,12 @@ from langchain.prompts import PromptTemplate
|
|
11 |
from pathlib import Path
|
12 |
import os
|
13 |
from pypdf import PdfReader
|
14 |
-
|
15 |
from llm_call import SermonGeminiPromptTemplate
|
|
|
16 |
bookQuestion = dict()
|
17 |
llm = None
|
18 |
embed_model = None
|
|
|
19 |
|
20 |
contemplandoQuestion = {
|
21 |
'DEVOCIONALMENTE':'驴C贸mo estimula Dios su coraz贸n a trav茅s de Su Palabra?',
|
@@ -41,6 +42,7 @@ HISTORY_ANSWER = ""
|
|
41 |
|
42 |
DIRECTORY_PATH_TO_DOWNLOAD = 'data/sermon_lab_ai/download_files'
|
43 |
|
|
|
44 |
if not os.path.exists(DIRECTORY_PATH_TO_DOWNLOAD):
|
45 |
os.makedirs(f"{DIRECTORY_PATH_TO_DOWNLOAD}")
|
46 |
|
@@ -205,6 +207,7 @@ def predictQuestionBuild(sermonTopic):
|
|
205 |
####
|
206 |
def predictDevotionBuild(sermonTopic):
|
207 |
templates = SermonGeminiPromptTemplate()
|
|
|
208 |
chain = updatePromptTemplate(
|
209 |
templates.getSermonPromptTemplate()['BUILD_REFLECTIONS'],
|
210 |
['SERMON_IDEA', 'context']
|
|
|
11 |
from pathlib import Path
|
12 |
import os
|
13 |
from pypdf import PdfReader
|
|
|
14 |
from llm_call import SermonGeminiPromptTemplate
|
15 |
+
|
16 |
bookQuestion = dict()
|
17 |
llm = None
|
18 |
embed_model = None
|
19 |
+
retriever = None
|
20 |
|
21 |
contemplandoQuestion = {
|
22 |
'DEVOCIONALMENTE':'驴C贸mo estimula Dios su coraz贸n a trav茅s de Su Palabra?',
|
|
|
42 |
|
43 |
DIRECTORY_PATH_TO_DOWNLOAD = 'data/sermon_lab_ai/download_files'
|
44 |
|
45 |
+
|
46 |
if not os.path.exists(DIRECTORY_PATH_TO_DOWNLOAD):
|
47 |
os.makedirs(f"{DIRECTORY_PATH_TO_DOWNLOAD}")
|
48 |
|
|
|
207 |
####
|
208 |
def predictDevotionBuild(sermonTopic):
|
209 |
templates = SermonGeminiPromptTemplate()
|
210 |
+
|
211 |
chain = updatePromptTemplate(
|
212 |
templates.getSermonPromptTemplate()['BUILD_REFLECTIONS'],
|
213 |
['SERMON_IDEA', 'context']
|