JLBKMVE commited on
Commit
552e392
·
verified ·
1 Parent(s): fbf65e9

Adjusting scaping of quotes

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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
- {'\n'.join([f"ID: {ref_id}, Text: {text[:500]}..." for ref_id, text in zip(reference_ids, source_texts)])}
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
  """