Air_Cooler / app.py
brian25's picture
Update app.py
7f01528 verified
raw
history blame
937 Bytes
import numpy as np
import os
import gradio as gr
os.environ["KERAS_BACKEND"] = "tensorflow"
import keras
model = keras.saving.load_model("hf://brian25/Air_Cooler")
def comp(Tempurature,Flowrate):
Tempurature = Tempurature/40
Flowrate = Flowrate/2120312
Xn = np.array([[Tempurature,Flowrate]])
Yn = abs(model.predict(Xn))
Power = np.round(Yn[0,0]*132.3, 2)
Tempurature = np.round(Yn[0,1]*93, 2)
return Power, Tempurature
demo = gr.Interface(fn=comp,inputs=["number", "number"],outputs=["number", "number"],
title="Air Cooler Performance Model",
description="This model is built by Deep Nural Network for evaluating performance of Air Cooler used for CO2 cooling. Here, you have to define Atmospheric air temperature in (Deg.C) and Air flowrate in (Kg/hr). First output is Fan Power in (KW) and second output is Cooled CO2 Temperature in (Deg.C)."
)
demo.launch()