Spaces:
Sleeping
Sleeping
| 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) | |