Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
@@ -218,7 +218,8 @@ def matchingScoreWithTimeout(sentence, content):
|
|
218 |
timer = threading.Timer(2, timeout_handler) # Set a timer for 2 seconds
|
219 |
timer.start()
|
220 |
try:
|
221 |
-
score = sentence_similarity(sentence, content)
|
|
|
222 |
timer.cancel() # Cancel the timer if calculation completes before timeout
|
223 |
return score
|
224 |
except TimeoutError:
|
|
|
218 |
timer = threading.Timer(2, timeout_handler) # Set a timer for 2 seconds
|
219 |
timer.start()
|
220 |
try:
|
221 |
+
# score = sentence_similarity(sentence, content)
|
222 |
+
score = matchingScore(sentence, content)
|
223 |
timer.cancel() # Cancel the timer if calculation completes before timeout
|
224 |
return score
|
225 |
except TimeoutError:
|