fix: NamedTemporaryFile not defined
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import base64
|
|
3 |
from fastapi import FastAPI, HTTPException
|
4 |
from PIL import Image
|
5 |
from pydantic import BaseModel
|
6 |
-
|
7 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
8 |
|
9 |
app = FastAPI()
|
@@ -30,7 +30,7 @@ print("INFO: Model & Tokenizer loaded!")
|
|
30 |
|
31 |
@app.get("/")
|
32 |
def greet_json():
|
33 |
-
return {"
|
34 |
|
35 |
|
36 |
@app.post("/query")
|
|
|
3 |
from fastapi import FastAPI, HTTPException
|
4 |
from PIL import Image
|
5 |
from pydantic import BaseModel
|
6 |
+
from tempfile import NamedTemporaryFile
|
7 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
8 |
|
9 |
app = FastAPI()
|
|
|
30 |
|
31 |
@app.get("/")
|
32 |
def greet_json():
|
33 |
+
return {"message": "Server is UP!"}
|
34 |
|
35 |
|
36 |
@app.post("/query")
|