Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
|
@@ -1,17 +1,17 @@
|
|
| 1 |
-
from fastapi import FastAPI
|
| 2 |
-
from app import predict
|
| 3 |
-
import os
|
| 4 |
-
from huggingface_hub import login
|
| 5 |
-
|
| 6 |
-
os.environ['HF_HOME'] = '/hug/cache/'
|
| 7 |
-
os.environ['TRANSFORMERS_CACHE'] = '/blabla/cache/'
|
| 8 |
-
|
| 9 |
-
app = FastAPI()
|
| 10 |
-
|
| 11 |
-
@app.get("/")
|
| 12 |
-
|
| 13 |
-
return {"Code Review Automation":"Version 1.0 'First Draft'"}
|
| 14 |
-
|
| 15 |
-
@app.post("/AutomateReview/")
|
| 16 |
-
def predict(input_json: str):
|
| 17 |
return predict(input_json)
|
|
|
|
| 1 |
+
from fastapi import FastAPI
|
| 2 |
+
from app import predict
|
| 3 |
+
import os
|
| 4 |
+
from huggingface_hub import login
|
| 5 |
+
|
| 6 |
+
os.environ['HF_HOME'] = '/hug/cache/'
|
| 7 |
+
os.environ['TRANSFORMERS_CACHE'] = '/blabla/cache/'
|
| 8 |
+
|
| 9 |
+
app = FastAPI()
|
| 10 |
+
|
| 11 |
+
@app.get("/")
|
| 12 |
+
def root():
|
| 13 |
+
return {"Code Review Automation":"Version 1.0 'First Draft'"}
|
| 14 |
+
|
| 15 |
+
@app.post("/AutomateReview/")
|
| 16 |
+
def predict(input_json: str):
|
| 17 |
return predict(input_json)
|