VyLala commited on
Commit
39ad3dc
·
verified ·
1 Parent(s): c7f7f09

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +4 -4
pipeline.py CHANGED
@@ -267,7 +267,7 @@ async def process_link_chunk_allOutput(link, iso, acc, saveLinkFolder, linksWith
267
 
268
  return all_output
269
 
270
- def extractSources(doi, linksWithTexts, links, all_output, iso, acc, saveLinkFolder, niche_cases=None):
271
  article_text = ""
272
  if doi != "unknown":
273
  link = 'https://doi.org/' + doi
@@ -503,7 +503,7 @@ async def pipeline_with_gemini(accessions,stop_flag=None, save_df=None, niche_ca
503
  acc_score["file_all_output"] = str(all_filename)
504
  print("acc sscore for file all output: ", acc_score["file_all_output"])
505
  if len(acc_score["file_all_output"]) == 0 or doi!="unknown":
506
- linksWithTexts, links, all_output = extractSources(doi, linksWithTexts, links, all_output, iso, acc, sample_folder_id, niche_cases)
507
  links = unique_preserve_order(links)
508
  print("this is links: ",links)
509
  acc_score["source"] = links
@@ -539,14 +539,14 @@ async def pipeline_with_gemini(accessions,stop_flag=None, save_df=None, niche_ca
539
  temp_source = True
540
  if temp_source:
541
  print("temp source is true so have to try again search link")
542
- linksWithTexts, links, all_output = extractSources(doi, linksWithTexts, links, all_output, iso, acc, sample_folder_id, niche_cases)
543
  links = unique_preserve_order(links)
544
  print("links: ", links)
545
  acc_score["source"] = links
546
  except:
547
  try:
548
  print("in the exception and start to get link")
549
- linksWithTexts, links, all_output = extractSources(doi, linksWithTexts, links, all_output, iso, acc, sample_folder_id, niche_cases)
550
  links = unique_preserve_order(links)
551
  print("this is links: ",links)
552
  acc_score["source"] = links
 
267
 
268
  return all_output
269
 
270
+ async def extractSources(doi, linksWithTexts, links, all_output, iso, acc, saveLinkFolder, niche_cases=None):
271
  article_text = ""
272
  if doi != "unknown":
273
  link = 'https://doi.org/' + doi
 
503
  acc_score["file_all_output"] = str(all_filename)
504
  print("acc sscore for file all output: ", acc_score["file_all_output"])
505
  if len(acc_score["file_all_output"]) == 0 or doi!="unknown":
506
+ linksWithTexts, links, all_output = await extractSources(doi, linksWithTexts, links, all_output, iso, acc, sample_folder_id, niche_cases)
507
  links = unique_preserve_order(links)
508
  print("this is links: ",links)
509
  acc_score["source"] = links
 
539
  temp_source = True
540
  if temp_source:
541
  print("temp source is true so have to try again search link")
542
+ linksWithTexts, links, all_output = await extractSources(doi, linksWithTexts, links, all_output, iso, acc, sample_folder_id, niche_cases)
543
  links = unique_preserve_order(links)
544
  print("links: ", links)
545
  acc_score["source"] = links
546
  except:
547
  try:
548
  print("in the exception and start to get link")
549
+ linksWithTexts, links, all_output = await extractSources(doi, linksWithTexts, links, all_output, iso, acc, sample_folder_id, niche_cases)
550
  links = unique_preserve_order(links)
551
  print("this is links: ",links)
552
  acc_score["source"] = links