Download app.py from Idhammz/Chat-AI: direct link, hf CLI and curl.
- Browser
- Download file 504 Bytes
-
https://huggingface.co/spaces/Idhammz/Chat-AI/resolve/main/app.py
- Command line
-
hf download hf://spaces/Idhammz/Chat-AI/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Idhammz/Chat-AI/resolve/main/app.py
504 Bytes
| 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" | |
| async def say_hello(): | |
| return "hello" | |
| if __name__ == "__main__": | |
| uvicorn.run(app, host="0.0.0.0", port=8000) | |