Skip to content
Snippets Groups Projects
Commit 081c9264 authored by Tomasz Walkowiak's avatar Tomasz Walkowiak
Browse files

Update winer_worker.py

parent 16b95b53
Branches
Tags
No related merge requests found
Pipeline #17460 failed with stages
in 22 seconds
......@@ -2,6 +2,8 @@
from winer import Winer, allign_into_entities, get_sentences_from_document
import clarin_json
from clarin_json.containers import Span
import gc
import torch
import nlp_ws
......@@ -74,3 +76,8 @@ class WinerWorker(nlp_ws.NLPWorker):
# Write processed document
fout.write(document)
#clean the memory
gc.collect()
torch.cuda.empty_cache()
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment