import numpy as np import gradio as gr import tensorflow as tf from tensorflow import keras import pandas as pd model = tf.keras.models.load_model("Oxygen Content.keras") def predict(Fuel,Air): Fuel = (Fuel*1700)/17000 Air = (Air*13000)/130000 xn = np.array([[Fuel,Air]]) yn = abs(model.predict(xn)) Percantage = np.round(yn[0,0]*100, 2) return Percantage demo = gr.Interface(fn=predict,inputs=["number", "number"],outputs=["number"], title="Oxygen Content(%) Analyzer in Flue Gas", description="Input Fuel Flowrate and Air Flowrate as per controller recorder value for example: 2.2 or 5.5 etc. This model will predict the Oxygen Content(%) in Flue Gas just like real life analyzer.", ) demo.launch(share=True)