gusdelact commited on
Commit
7d770b1
1 Parent(s): f65563c

version inicial

Browse files
Files changed (4) hide show
  1. app.py +19 -0
  2. modelo_regresion.pkl +3 -0
  3. panaderias.csv +11 -0
  4. requirement.txt +3 -0
app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import pickle
3
+ import pandas as pd
4
+
5
+ def predict(x1,x2):
6
+
7
+ new_data = pd.DataFrame({'Floor space of the shop':[x1],
8
+ 'Distance to the nearest station':[x2]}
9
+ )
10
+ # Load the trained model
11
+ with open('modelo_regresion.pkl', 'rb') as f:
12
+ model = pickle.load(f)
13
+ y_pred = model.predict(new_data)
14
+ return y_pred[0]
15
+
16
+
17
+ if __name__ == "__main__":
18
+ demo = gr.Interface(fn=predict, inputs=["number","number"], outputs="number")
19
+ demo.launch()
modelo_regresion.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d30dcbf9886112b4c47138e72cd898a3c0360ec764f0474e2b95a81e31abe24
3
+ size 582
panaderias.csv ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Bakery,Floor space of the shop,Distance to the nearest station,Monthly sales
2
+ Yumenoooka Shop,10,80,469
3
+ Terai Station Shop,8,0,366
4
+ Sone Shop,8,200,371
5
+ Hashimoto Station Shop,5,200,208
6
+ Kikyou Town Shop,7,300,246
7
+ Post Office Shop,8,230,297
8
+ Suidobashi Station Shop,7,40,363
9
+ Rokujo Station Shop,9,0,436
10
+ Wakaba Riverside Shop,6,330,198
11
+ Misato Shop,9,180,364
requirement.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ gradio
2
+ scikit-learn
3
+ pandas