Adjusting scaping of quotes
Browse files
app.py
CHANGED
@@ -499,11 +499,12 @@ def add_references_to_summary(summary, source_df, reference_column, url_column=N
|
|
499 |
|
500 |
if line.strip().startswith('- ') or line.strip().startswith('* '):
|
501 |
# Process each bullet point
|
|
|
502 |
user_prompt = f"""
|
503 |
Text: {line.strip()}
|
504 |
|
505 |
Source texts:
|
506 |
-
{
|
507 |
|
508 |
Which source ID(s) did this text most likely come from? Return only the ID(s) separated by commas, or "unknown".
|
509 |
"""
|
|
|
499 |
|
500 |
if line.strip().startswith('- ') or line.strip().startswith('* '):
|
501 |
# Process each bullet point
|
502 |
+
source_texts_formatted = '\n'.join([f"ID: {ref_id}, Text: {text[:500]}..." for ref_id, text in zip(reference_ids, source_texts)])
|
503 |
user_prompt = f"""
|
504 |
Text: {line.strip()}
|
505 |
|
506 |
Source texts:
|
507 |
+
{source_texts_formatted}
|
508 |
|
509 |
Which source ID(s) did this text most likely come from? Return only the ID(s) separated by commas, or "unknown".
|
510 |
"""
|