mirror of
https://github.com/katanemo/plano.git
synced 2026-06-29 15:49:40 +02:00
Refacotr model configs
This commit is contained in:
parent
320f4612b8
commit
95e167c2f6
12 changed files with 1144 additions and 206 deletions
|
|
@ -3,22 +3,9 @@ import torch
|
|||
import numpy as np
|
||||
import src.commons.utils as utils
|
||||
|
||||
from typing import List
|
||||
from pydantic import BaseModel
|
||||
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
||||
from optimum.intel import OVModelForSequenceClassification
|
||||
|
||||
|
||||
class GuardRequest(BaseModel):
|
||||
input: str
|
||||
task: str
|
||||
|
||||
|
||||
class GuardResponse(BaseModel):
|
||||
prob: List
|
||||
verdict: bool
|
||||
sentence: List
|
||||
latency: float = 0
|
||||
from src.core.model_utils import GuardRequest, GuardResponse
|
||||
|
||||
|
||||
class ArchGuardHanlder:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue