jattokatarratto commited on
Commit
9bb2916
·
verified ·
1 Parent(s): 07c774d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -1386,7 +1386,7 @@ def getLinearTextualContextFromTriples(word,labelTriplesLIST, text_splitter, arg
1386
 
1387
  if not df_retrieved.empty:
1388
  #labelTriplesLIST_RAGGED = df_retrieved.to_records(index=False).tolist()
1389
- labelTriplesLIST_RAGGED = df_retrieved['Passages'].apply(lambda x: (x,)).tolist()
1390
  labelTriplesAPP = ". ".join(
1391
  " ".join(str(element).capitalize() for element in triple) for triple in labelTriplesLIST_RAGGED)
1392
 
@@ -1420,7 +1420,7 @@ def getLinearTextualContextFromTriples(word,labelTriplesLIST, text_splitter, arg
1420
  df_retrieved = df_retrievedtopk.copy()
1421
  if not df_retrieved.empty:
1422
  #labelTriplesLIST_RAGGED = df_retrieved.to_records(index=False).tolist()
1423
- labelTriplesLIST_RAGGED = df_retrieved['Passages'].apply(lambda x: (x,)).tolist()
1424
  if not Oinnerlistiterative:
1425
  Oinnerlistiterative=labelTriplesLIST_RAGGED
1426
  else:
@@ -1433,7 +1433,7 @@ def getLinearTextualContextFromTriples(word,labelTriplesLIST, text_splitter, arg
1433
  df_retrieved = df_retrievedtopk.copy()
1434
  if not df_retrieved.empty:
1435
  #labelTriplesLIST_RAGGED = df_retrieved.to_records(index=False).tolist()
1436
- labelTriplesLIST_RAGGED = df_retrieved['Passages'].apply(lambda x: (x,)).tolist()
1437
  if not Oinnerlistiterative:
1438
  Oinnerlistiterative = labelTriplesLIST_RAGGED
1439
  else:
@@ -1474,7 +1474,7 @@ def getLinearTextualContextFromTriples(word,labelTriplesLIST, text_splitter, arg
1474
  # df_retrieved = df_retrievedtopk.copy()
1475
  # if not df_retrieved.empty:
1476
  # #labelTriplesLIST_RAGGED = df_retrieved.to_records(index=False).tolist()
1477
- # labelTriplesLIST_RAGGED = df_retrieved['Passages'].apply(lambda x: (x,)).tolist()
1478
  # labelTriplesAPP = ". ".join(" ".join(str(element).capitalize() for element in triple) for triple in labelTriplesLIST_RAGGED)
1479
  #
1480
  # if not labelTriples:
@@ -1488,7 +1488,7 @@ def getLinearTextualContextFromTriples(word,labelTriplesLIST, text_splitter, arg
1488
  # df_retrieved = df_retrievedtopk.copy()
1489
  # if not df_retrieved.empty:
1490
  # #labelTriplesLIST_RAGGED = df_retrieved.to_records(index=False).tolist()
1491
- # labelTriplesLIST_RAGGED = df_retrieved['Passages'].apply(lambda x: (x,)).tolist()
1492
  # labelTriplesAPP = ". ".join(" ".join(str(element).capitalize() for element in triple) for triple in labelTriplesLIST_RAGGED)
1493
  # if not labelTriples:
1494
  # labelTriples = labelTriplesAPP
 
1386
 
1387
  if not df_retrieved.empty:
1388
  #labelTriplesLIST_RAGGED = df_retrieved.to_records(index=False).tolist()
1389
+ labelTriplesLIST_RAGGED = df_retrieved['Passage'].apply(lambda x: (x,)).tolist()
1390
  labelTriplesAPP = ". ".join(
1391
  " ".join(str(element).capitalize() for element in triple) for triple in labelTriplesLIST_RAGGED)
1392
 
 
1420
  df_retrieved = df_retrievedtopk.copy()
1421
  if not df_retrieved.empty:
1422
  #labelTriplesLIST_RAGGED = df_retrieved.to_records(index=False).tolist()
1423
+ labelTriplesLIST_RAGGED = df_retrieved['Passage'].apply(lambda x: (x,)).tolist()
1424
  if not Oinnerlistiterative:
1425
  Oinnerlistiterative=labelTriplesLIST_RAGGED
1426
  else:
 
1433
  df_retrieved = df_retrievedtopk.copy()
1434
  if not df_retrieved.empty:
1435
  #labelTriplesLIST_RAGGED = df_retrieved.to_records(index=False).tolist()
1436
+ labelTriplesLIST_RAGGED = df_retrieved['Passage'].apply(lambda x: (x,)).tolist()
1437
  if not Oinnerlistiterative:
1438
  Oinnerlistiterative = labelTriplesLIST_RAGGED
1439
  else:
 
1474
  # df_retrieved = df_retrievedtopk.copy()
1475
  # if not df_retrieved.empty:
1476
  # #labelTriplesLIST_RAGGED = df_retrieved.to_records(index=False).tolist()
1477
+ # labelTriplesLIST_RAGGED = df_retrieved['Passage'].apply(lambda x: (x,)).tolist()
1478
  # labelTriplesAPP = ". ".join(" ".join(str(element).capitalize() for element in triple) for triple in labelTriplesLIST_RAGGED)
1479
  #
1480
  # if not labelTriples:
 
1488
  # df_retrieved = df_retrievedtopk.copy()
1489
  # if not df_retrieved.empty:
1490
  # #labelTriplesLIST_RAGGED = df_retrieved.to_records(index=False).tolist()
1491
+ # labelTriplesLIST_RAGGED = df_retrieved['Passage'].apply(lambda x: (x,)).tolist()
1492
  # labelTriplesAPP = ". ".join(" ".join(str(element).capitalize() for element in triple) for triple in labelTriplesLIST_RAGGED)
1493
  # if not labelTriples:
1494
  # labelTriples = labelTriplesAPP