Spaces:
Sleeping
Sleeping
Commit ·
1c5c4dc
1
Parent(s): 87fd55e
refactor get_docs function
Browse files
app.py
CHANGED
|
@@ -76,12 +76,11 @@ def get_course_details(url):
|
|
| 76 |
"course_name" : course_name
|
| 77 |
}
|
| 78 |
course_texts.append(course_text)
|
| 79 |
-
json_data = json.dumps(course_texts, indent=4)
|
| 80 |
with open('content.json', 'w') as f:
|
| 81 |
json.dump(course_texts, f, indent=4)
|
| 82 |
return course_texts
|
| 83 |
|
| 84 |
-
def get_documents(
|
| 85 |
texts = []
|
| 86 |
metadatas = []
|
| 87 |
for course_text in course_texts:
|
|
|
|
| 76 |
"course_name" : course_name
|
| 77 |
}
|
| 78 |
course_texts.append(course_text)
|
|
|
|
| 79 |
with open('content.json', 'w') as f:
|
| 80 |
json.dump(course_texts, f, indent=4)
|
| 81 |
return course_texts
|
| 82 |
|
| 83 |
+
def get_documents(course_texts):
|
| 84 |
texts = []
|
| 85 |
metadatas = []
|
| 86 |
for course_text in course_texts:
|