Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
import gradio as gr
|
3 |
+
import tensorflow as tf
|
4 |
+
from tensorflow import keras
|
5 |
+
import pandas as pd
|
6 |
+
|
7 |
+
model = tf.keras.models.load_model("Oxygen Content.keras")
|
8 |
+
|
9 |
+
def predict(Fuel,Air):
|
10 |
+
Fuel = (Fuel*1700)/17000
|
11 |
+
Air = (Air*13000)/130000
|
12 |
+
xn = np.array([[Fuel,Air]])
|
13 |
+
yn = abs(model.predict(xn))
|
14 |
+
Percantage = np.round(yn[0,0]*100, 2)
|
15 |
+
return Percantage
|
16 |
+
|
17 |
+
demo = gr.Interface(fn=predict,inputs=["number", "number"],outputs=["number"],
|
18 |
+
title="Oxygen Content(%) Analyzer in Flue Gas",
|
19 |
+
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.",
|
20 |
+
)
|
21 |
+
|
22 |
+
demo.launch(share=True)
|