File size: 504 Bytes
5a59056 56f80be 633d676 56f80be 633d676 040b178 56f80be | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import re
import base64
from PIL import Image
from io import BytesIO
import numpy as np
from fastapi import FastAPI
from pydantic import BaseModel
from keras.models import load_model
from keras.utils import img_to_array
from tensorflow.keras.utils import load_img, img_to_array
import uvicorn
app = FastAPI()
# Endpoint baru /hello yang mengembalikan string "hello"
@app.get("/hello")
async def say_hello():
return "hello"
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=8000)
|