Spaces:
Sleeping
Sleeping
processed_context += entry.get('text', '') + "\n"
Browse files- educational_material.py +2 -3
educational_material.py
CHANGED
|
@@ -34,10 +34,9 @@ class EducationalMaterial:
|
|
| 34 |
|
| 35 |
def _prepare_context(self, context):
|
| 36 |
context_json = json.loads(context)
|
|
|
|
| 37 |
for entry in context_json:
|
| 38 |
-
entry.
|
| 39 |
-
entry.pop('screenshot_path', None)
|
| 40 |
-
processed_context = json.dumps(context_json, ensure_ascii=False, indent=2)
|
| 41 |
return processed_context
|
| 42 |
|
| 43 |
def generate_content_prompt(self):
|
|
|
|
| 34 |
|
| 35 |
def _prepare_context(self, context):
|
| 36 |
context_json = json.loads(context)
|
| 37 |
+
processed_context = ""
|
| 38 |
for entry in context_json:
|
| 39 |
+
processed_context += entry.get('text', '') + "\n"
|
|
|
|
|
|
|
| 40 |
return processed_context
|
| 41 |
|
| 42 |
def generate_content_prompt(self):
|