So here is a hack to do this ( I personally would refactor my code and not do this but since your requirement does not elaborate much i am going to suggest this-)
You must have a daemon which runs the online service. Import spacy in the daemon and pass it as a parameter to the file that does the nlp stuff.
I would refactor my code to use a class as mentioned in the solution by @dhruv which is much cleaner.
The following example is a rough sketch of how to go about things. (Very bad programming principle though.)
File1.py
def caller(a,np):
return np.array(a)
File2.py
import numpy as np
from File1 import caller
z=caller(10,np)
print z
The above method will have a load time for the very first time the daemon is started , after that it's just a function call.
Hope this helps!