File size: 397 Bytes
5846481
 
 
 
 
 
 
 
 
 
 
837bb05
5846481
 
 
837bb05
1e940e5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from fastapi import FastAPI
from app import predict
import os
from huggingface_hub import login

os.environ['HF_HOME'] = '/hug/cache/'
os.environ['TRANSFORMERS_CACHE'] = '/blabla/cache/'

app = FastAPI()

@app.get("/")
async def root():
 return {"Code Review Automation":"Version 1.0 'First Draft'"}

@app.post("/AutomateReview/")
async def predict(input_json: str):
    return predict(input_json)