aibmedia commited on
Commit
15b3851
·
verified ·
1 Parent(s): b1cff41

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -90,7 +90,7 @@ async def server_1():
90
  # payload = { "inputs": { "source_sentence": "Manila is the capital city of the Philippines", "sentences": ["The current capital city, Manila, has been the countrys capital throughout most of its history and regained the title through a presidential order in 1976", "Manila officially the City of Manila (Filipino: Lungsod ng Maynila), is the capital and second-most populous city of the Philippines, after Quezon City.", "Dis 4, 2024 — Manila, capital and chief city of the Philippines. The city is the centre of the countrys economic, political, social, and cultural activity.", "Quezon City is the capital of the Philippines", "Manila is the capital of the philippines", "For sometime Manila has been the capital of of the Philippines" , "What is the capital of Philippines", "Manila is not the capital of the Phillipines", "Quezon city was the capital of the Philippines, until President Ferdinand Marcos Sr. moved the capital to back to Manila. " ] } , }
91
  # payload = { "inputs": { "source_sentence": "Manila is the capital city of the Philippines", "sentences": ["The current capital city, Manila, has been the country's capital throughout most of its history and regained the title through a presidential order in 1976"] } , }
92
  payload = { "inputs": { "source_sentence": "Manila is the capital city of the Philippines", "sentences": ["The current capital city, Manila, has been the countrys capital throughout most","Manila officially the City of Manila (Filipino: Lungsod ng Maynila),","Dis 4, 2024 — Manila, capital and chief city of the Philippines. The city is the centre ","Quezon City is the capital of the Philippines","Manila is the capital of the philippines","For sometime Manila has been the capital of of the Philippines" ,"What is the capital of Philippines","Manila is not the capital of the Phillipines","Quezon city was the capital of the Philippines, until President Ferdinand "] } , }
93
- await response0 = requests.post(API_URL0, headers=headers, json=payload)
94
  response1 = requests.post(API_URL1, headers=headers, json=payload)
95
  response2 = requests.post(API_URL2, headers=headers, json=payload)
96
  response3 = requests.post(API_URL3, headers=headers, json=payload)
@@ -106,7 +106,7 @@ async def server_1():
106
  similarity_scores = "There's an error in llm similarity search retrieval"
107
  return similarity_scores
108
 
109
- time.sleep(4)
110
  print(similarity_scores)
111
  print(type(similarity_scores))
112
  print("length")
@@ -313,7 +313,7 @@ async def server_1():
313
  # the top 3 indexes must be above .78 similarity score
314
  # the top 3 must have occured 4 times or more in combined_indexes
315
 
316
-
317
  return all_results
318
 
319
 
 
90
  # payload = { "inputs": { "source_sentence": "Manila is the capital city of the Philippines", "sentences": ["The current capital city, Manila, has been the countrys capital throughout most of its history and regained the title through a presidential order in 1976", "Manila officially the City of Manila (Filipino: Lungsod ng Maynila), is the capital and second-most populous city of the Philippines, after Quezon City.", "Dis 4, 2024 — Manila, capital and chief city of the Philippines. The city is the centre of the countrys economic, political, social, and cultural activity.", "Quezon City is the capital of the Philippines", "Manila is the capital of the philippines", "For sometime Manila has been the capital of of the Philippines" , "What is the capital of Philippines", "Manila is not the capital of the Phillipines", "Quezon city was the capital of the Philippines, until President Ferdinand Marcos Sr. moved the capital to back to Manila. " ] } , }
91
  # payload = { "inputs": { "source_sentence": "Manila is the capital city of the Philippines", "sentences": ["The current capital city, Manila, has been the country's capital throughout most of its history and regained the title through a presidential order in 1976"] } , }
92
  payload = { "inputs": { "source_sentence": "Manila is the capital city of the Philippines", "sentences": ["The current capital city, Manila, has been the countrys capital throughout most","Manila officially the City of Manila (Filipino: Lungsod ng Maynila),","Dis 4, 2024 — Manila, capital and chief city of the Philippines. The city is the centre ","Quezon City is the capital of the Philippines","Manila is the capital of the philippines","For sometime Manila has been the capital of of the Philippines" ,"What is the capital of Philippines","Manila is not the capital of the Phillipines","Quezon city was the capital of the Philippines, until President Ferdinand "] } , }
93
+ response0 = requests.post(API_URL0, headers=headers, json=payload)
94
  response1 = requests.post(API_URL1, headers=headers, json=payload)
95
  response2 = requests.post(API_URL2, headers=headers, json=payload)
96
  response3 = requests.post(API_URL3, headers=headers, json=payload)
 
106
  similarity_scores = "There's an error in llm similarity search retrieval"
107
  return similarity_scores
108
 
109
+ await time.sleep(4)
110
  print(similarity_scores)
111
  print(type(similarity_scores))
112
  print("length")
 
313
  # the top 3 indexes must be above .78 similarity score
314
  # the top 3 must have occured 4 times or more in combined_indexes
315
 
316
+ time.sleep(4)
317
  return all_results
318
 
319