JLBKMVE commited on
Commit
ec635c4
·
verified ·
1 Parent(s): 6ae34a5

Still adjusting scaping

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -551,11 +551,12 @@ def add_references_to_summary(summary, source_df, reference_column, url_column=N
551
  if not sentence.strip():
552
  continue
553
 
 
554
  user_prompt = f"""
555
  Sentence: {sentence.strip()}
556
 
557
  Source texts:
558
- {'\n'.join([f"ID: {ref_id}, Text: {text[:500]}..." for ref_id, text in zip(reference_ids, source_texts)])}
559
 
560
  Which source ID(s) did this sentence most likely come from? Return only the ID(s) separated by commas, or "unknown".
561
  """
 
551
  if not sentence.strip():
552
  continue
553
 
554
+ source_texts_formatted = '\n'.join([f"ID: {ref_id}, Text: {text[:500]}..." for ref_id, text in zip(reference_ids, source_texts)])
555
  user_prompt = f"""
556
  Sentence: {sentence.strip()}
557
 
558
  Source texts:
559
+ {source_texts_formatted}
560
 
561
  Which source ID(s) did this sentence most likely come from? Return only the ID(s) separated by commas, or "unknown".
562
  """