Spaces:
Runtime error
Runtime error
File size: 353 Bytes
b3dbccc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import os
from radio_embed import radio_embed
from multiprocessing import cpu_count
import ray
num_cpus = cpu_count()
os.environ["TOKENIZERS_PARALLELISM"] = "false"
if not ray.is_initialized():
ray.init(num_cpus=num_cpus)
@ray.remote
def ray_embed(text):
return radio_embed(text)
|