Spaces:
Sleeping
Sleeping
Download app.py from gitshiva/samplemodel01: direct link, hf CLI and curl.
- Browser
- Download file 384 Bytes
-
https://huggingface.co/spaces/gitshiva/samplemodel01/resolve/main/app.py
- Command line
-
hf download hf://spaces/gitshiva/samplemodel01/app.py
-
curl -L -o app.py https://huggingface.co/spaces/gitshiva/samplemodel01/resolve/main/app.py
384 Bytes
| import tensorflow as tf | |
| from tensorflow import keras | |
| import gradio as gr | |
| model = tf.keras.models.load_model('samplemodel01.keras') | |
| def prediction(x): | |
| a2 = [[int(x)]] | |
| print (a2) | |
| a2 = tf.convert_to_tensor(a2) | |
| return model.predict(a2) | |
| demo = gr.Interface( | |
| fn=prediction, | |
| inputs=["text"], | |
| outputs=["text"] | |
| ) | |
| demo.launch(server_name="0.0.0.0", share=True) | |