Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ def api_call(messages, temperature=0.5, model="gpt-4o-2024-05-13"):
|
|
| 12 |
model=model
|
| 13 |
).choices[0].message.content
|
| 14 |
|
| 15 |
-
def chunk_HTMLs(text, delimiter="HTML (ID:
|
| 16 |
HTMLs = text.split(delimiter)
|
| 17 |
HTMLs = HTMLs[1:] if HTMLs[0] else HTMLs
|
| 18 |
html_dict = {}
|
|
@@ -21,8 +21,8 @@ def chunk_HTMLs(text, delimiter="HTML (ID: "):
|
|
| 21 |
if end_id_index != -1:
|
| 22 |
html_id = html[:end_id_index].strip()
|
| 23 |
html_content = html[end_id_index+1:].strip()
|
| 24 |
-
full_html_id = "HTML: (ID:
|
| 25 |
-
html_dict[full_html_id] = delimiter + "HTML (ID:
|
| 26 |
return html_dict
|
| 27 |
|
| 28 |
def process_course(input_text, term_zorgvrager="cliënt", term_zorgprofessional="begeleider"):
|
|
|
|
| 12 |
model=model
|
| 13 |
).choices[0].message.content
|
| 14 |
|
| 15 |
+
def chunk_HTMLs(text, delimiter="HTML (ID:"):
|
| 16 |
HTMLs = text.split(delimiter)
|
| 17 |
HTMLs = HTMLs[1:] if HTMLs[0] else HTMLs
|
| 18 |
html_dict = {}
|
|
|
|
| 21 |
if end_id_index != -1:
|
| 22 |
html_id = html[:end_id_index].strip()
|
| 23 |
html_content = html[end_id_index+1:].strip()
|
| 24 |
+
full_html_id = "HTML: (ID:" + html_id + ")"
|
| 25 |
+
html_dict[full_html_id] = delimiter + "HTML (ID:" + html_id + ") " + html_content
|
| 26 |
return html_dict
|
| 27 |
|
| 28 |
def process_course(input_text, term_zorgvrager="cliënt", term_zorgprofessional="begeleider"):
|