Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
import os
|
2 |
from fastapi import FastAPI, File, UploadFile
|
3 |
from fastapi.responses import JSONResponse
|
4 |
from PIL import Image
|
@@ -8,7 +7,6 @@ import torch.nn.functional as F
|
|
8 |
from transformers import AutoImageProcessor, AutoModelForImageClassification
|
9 |
|
10 |
app = FastAPI()
|
11 |
-
os.environ["TRANSFORMERS_CACHE"] = "/tmp/hf_cache"
|
12 |
|
13 |
@app.get("/")
|
14 |
async def root():
|
|
|
|
|
1 |
from fastapi import FastAPI, File, UploadFile
|
2 |
from fastapi.responses import JSONResponse
|
3 |
from PIL import Image
|
|
|
7 |
from transformers import AutoImageProcessor, AutoModelForImageClassification
|
8 |
|
9 |
app = FastAPI()
|
|
|
10 |
|
11 |
@app.get("/")
|
12 |
async def root():
|