This commit is contained in:
superobk
2024-03-27 16:20:12 +08:00
parent 229501515a
commit 2a0c0e0477
86 changed files with 16 additions and 11 deletions

View File

@ -3,14 +3,14 @@ from typing import Any, Coroutine
from fastapi import Request, Response, status
from fastapi.responses import JSONResponse
from sentiment_engine.sentiment_engine import SentimentEngine
from ..sentiment_engine.sentiment_engine import SentimentEngine
from .blackbox import Blackbox
class Sentiment(Blackbox):
def __init__(self) -> None:
self.engine = SentimentEngine('resources/sentiment_engine/models/paimon_sentiment.onnx')
self.engine = SentimentEngine()
def __call__(self, *args, **kwargs):
return self.processing(*args, **kwargs)