Spaces:
Running
Running
from fastapi import FastAPI | |
from classifier.Albert_latest import get_model | |
app = FastAPI() | |
model = get_model() | |
async def predict(issue: str): | |
predictions = model.predict(issue) | |
print(f"Predictions: {predictions}") | |
id = predictions | |
print(f"Predictions: {predictions}") | |
return { | |
"priority 1": str(predictions[0]), | |
"priority 2": str(predictions[1]), | |
"priority 3": str(predictions[2]), | |
"priority 4": str(predictions[3]), | |
"priority 5": str(predictions[4]) | |
} | |