Spaces:
Running
Running
Update model.py
Browse files
model.py
CHANGED
|
@@ -1311,7 +1311,15 @@ async def query_document_info(niche_cases, query_word, alternative_query_word, s
|
|
| 1311 |
]
|
| 1312 |
print(f"Number of tasks to gather: {len(tasks)}")
|
| 1313 |
try:
|
| 1314 |
-
results = await asyncio.gather(*tasks)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1315 |
print("Finished gathering results")
|
| 1316 |
except Exception as e:
|
| 1317 |
print(f"Error in gathering: {e}")
|
|
|
|
| 1311 |
]
|
| 1312 |
print(f"Number of tasks to gather: {len(tasks)}")
|
| 1313 |
try:
|
| 1314 |
+
#results = await asyncio.gather(*tasks)
|
| 1315 |
+
results = await asyncio.gather(*tasks, return_exceptions=True)
|
| 1316 |
+
print(f"Results: {results}")
|
| 1317 |
+
for result in results:
|
| 1318 |
+
if isinstance(result, Exception):
|
| 1319 |
+
print(f"Error in task: {result}")
|
| 1320 |
+
else:
|
| 1321 |
+
print(f"Task completed successfully")
|
| 1322 |
+
|
| 1323 |
print("Finished gathering results")
|
| 1324 |
except Exception as e:
|
| 1325 |
print(f"Error in gathering: {e}")
|