jackenmail commited on
Commit
ab2c6ab
·
verified ·
1 Parent(s): 6a28008

Upload 3 files

Browse files
Files changed (3) hide show
  1. app.py +17 -0
  2. requirements.txt +3 -0
  3. scaler.pkl +3 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import joblib
2
+ import gradio as gr
3
+
4
+ # Load model
5
+ model = joblib.load("scaler.pkl")
6
+
7
+ # Prediction function
8
+ def predict(val1, val2):
9
+ prediction = model.predict([[float(val1), float(val2)]])
10
+ return str(prediction[0])
11
+
12
+ # UI
13
+ gr.Interface(
14
+ fn=predict,
15
+ inputs=["number", "number"],
16
+ outputs="text"
17
+ ).launch()
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ scikit-learn
2
+ joblib
3
+ gradio
scaler.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fbbbb17af4a0332e6152e6df9559e71267e556ab8514ec07d07dadc5d3306c0f
3
+ size 597