edulab / app_test_hf.py
bagaseptian's picture
test endpoint
ffd2f51
raw
history blame contribute delete
395 Bytes
from fastapi import FastAPI
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
app = FastAPI()
@app.get("/")
async def root_test():
logger.info("Root endpoint/ akses")
return{"message": "Hello hf"}
@app.get("/test-hf")
async def test_endpoint():
logger.info("berhasil akses endpont /test-hf")
return {"message": "Test endpoint workk!"}