Spaces:
Sleeping
Sleeping
wzkariampuzha
commited on
Commit
•
6eb976a
1
Parent(s):
b892550
Update epi_pipeline.py
Browse files- epi_pipeline.py +1 -2
epi_pipeline.py
CHANGED
@@ -25,7 +25,7 @@ def timeit(func):
|
|
25 |
end_time = time.perf_counter()
|
26 |
total_time = end_time - start_time
|
27 |
# first item in the args, ie `args[0]` is `self`
|
28 |
-
print(f'Function {func.__name__}
|
29 |
return result
|
30 |
return timeit_wrapper
|
31 |
|
@@ -273,7 +273,6 @@ class Classify_Pipeline:
|
|
273 |
prob_tensor = output.logits.softmax(dim=-1)
|
274 |
# We only want to return the probability that it is true
|
275 |
prob = prob_tensor.data[0][1].item()
|
276 |
-
print(f"Abstract is epidemiological: {isEpi}")
|
277 |
return prob, isEpi
|
278 |
else:
|
279 |
return 0.0, False
|
|
|
25 |
end_time = time.perf_counter()
|
26 |
total_time = end_time - start_time
|
27 |
# first item in the args, ie `args[0]` is `self`
|
28 |
+
print(f'Function {func.__name__} took {total_time:.4f} seconds to execute')
|
29 |
return result
|
30 |
return timeit_wrapper
|
31 |
|
|
|
273 |
prob_tensor = output.logits.softmax(dim=-1)
|
274 |
# We only want to return the probability that it is true
|
275 |
prob = prob_tensor.data[0][1].item()
|
|
|
276 |
return prob, isEpi
|
277 |
else:
|
278 |
return 0.0, False
|