Spaces:
Sleeping
Sleeping
Commit
·
a6892ae
1
Parent(s):
3b6d04c
小修补
Browse files
app.py
CHANGED
|
@@ -101,7 +101,6 @@ def courseOutlineGenerating(file_paths, num_lessons, language):
|
|
| 101 |
course_outline = genarating_outline(summarized_materials, num_lessons, language)
|
| 102 |
return course_outline
|
| 103 |
|
| 104 |
-
@st.cache_data
|
| 105 |
def constructVDB(file_paths):
|
| 106 |
#把KM拆解为chunks
|
| 107 |
|
|
@@ -206,7 +205,6 @@ def decorate_user_question(user_question, retrieved_chunks_for_user):
|
|
| 206 |
'''
|
| 207 |
return decorated_prompt
|
| 208 |
|
| 209 |
-
@st.cache_data
|
| 210 |
def initialize_app(added_files, num_lessons, language):
|
| 211 |
temp_file_paths = []
|
| 212 |
with st.spinner('Processing file...'):
|
|
@@ -241,7 +239,7 @@ def initialize_app(added_files, num_lessons, language):
|
|
| 241 |
for lesson in course_outline_list:
|
| 242 |
count_generating_content += 1
|
| 243 |
with st.spinner(f"Writing content for lesson {count_generating_content}..."):
|
| 244 |
-
retrievedChunksList = searchVDB(lesson,
|
| 245 |
courseContent = generateCourse(lesson, retrievedChunksList, language)
|
| 246 |
course_content_list.append(courseContent)
|
| 247 |
st.success(f"Writing content for lesson {count_generating_content}...Done")
|
|
|
|
| 101 |
course_outline = genarating_outline(summarized_materials, num_lessons, language)
|
| 102 |
return course_outline
|
| 103 |
|
|
|
|
| 104 |
def constructVDB(file_paths):
|
| 105 |
#把KM拆解为chunks
|
| 106 |
|
|
|
|
| 205 |
'''
|
| 206 |
return decorated_prompt
|
| 207 |
|
|
|
|
| 208 |
def initialize_app(added_files, num_lessons, language):
|
| 209 |
temp_file_paths = []
|
| 210 |
with st.spinner('Processing file...'):
|
|
|
|
| 239 |
for lesson in course_outline_list:
|
| 240 |
count_generating_content += 1
|
| 241 |
with st.spinner(f"Writing content for lesson {count_generating_content}..."):
|
| 242 |
+
retrievedChunksList = searchVDB(lesson, embeddings_df, faiss_index)
|
| 243 |
courseContent = generateCourse(lesson, retrievedChunksList, language)
|
| 244 |
course_content_list.append(courseContent)
|
| 245 |
st.success(f"Writing content for lesson {count_generating_content}...Done")
|