Download app.py from YukiNon/Practice3: direct link, hf CLI and curl.
- Browser
- Download file 295 Bytes
-
https://huggingface.co/spaces/YukiNon/Practice3/resolve/main/app.py
- Command line
-
hf download hf://spaces/YukiNon/Practice3/app.py
-
curl -L -o app.py https://huggingface.co/spaces/YukiNon/Practice3/resolve/main/app.py
295 Bytes
| import numpy as np | |
| import gradio as gr | |
| from tensorflow import keras | |
| model = keras.models.load_model('my_model') | |
| def greet(img): | |
| img = np.expand_dims(img, axis=0) | |
| return np.argmax(model.predict(img)[0]) | |
| demo = gr.Interface(fn=greet, inputs="sketchpad", outputs="text") | |
| demo.launch() | |