File size: 796 Bytes
7641329 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
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) |