HSMR / tools /service.py
IsshikiHugh's picture
update: gpu supports
56f3727
raw
history blame contribute delete
310 Bytes
from lib.kits.gradio import *
import os
import torch
os.environ['PYOPENGL_PLATFORM'] = 'egl'
if __name__ == '__main__':
# Start serving.
device = 'cuda' if torch.cuda.is_available() else 'cpu'
backend = HSMRBackend(device=device)
hsmr_service = HSMRService(backend)
hsmr_service.serve()