EstebanDC commited on
Commit
7a9dc15
1 Parent(s): ffb01f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -4
app.py CHANGED
@@ -37,10 +37,22 @@ pickle.dump(modelodef, open("modelodef.pkl", "wb"))
37
 
38
  #create a function for gradio
39
  def RCS(JET, Suelo,SPT, WtoC, Presion, Velocidad):
40
- x = np.array([JET, Suelo,SPT, WtoC, Presion, Velocidad])
41
- prediction = modelodef.predict(x.reshape(1, -1))
42
  return prediction
43
 
44
- outputs = gr.outputs.Textbox()
45
- app = gr.Interface(fn=RCS, inputs=['number','number','number','number','number','number'], outputs=outputs,description="UCS jet grouting")
 
 
 
 
 
 
 
 
 
 
 
 
46
  app.launch()
 
37
 
38
  #create a function for gradio
39
  def RCS(JET, Suelo,SPT, WtoC, Presion, Velocidad):
40
+ modelodef = pickle.load(open("modelodef.pkl", "rb"))
41
+ prediction = modelodef.predict([[JET, Suelo,SPT, WtoC, Presion, Velocidad]])
42
  return prediction
43
 
44
+
45
+ app = gr.Interface(
46
+ RCS,
47
+ inputs=[
48
+ gr.Number(value=1, label="JET"),
49
+ gr.Number(value=1, label="Suelo"),
50
+ gr.Number(value=1, label="SPT"),
51
+ gr.Number(value=1, label="WtoC"),
52
+ gr.Number(value=1, label="Presion"),
53
+ gr.Number(value=1, label="velocidad"),
54
+ ],
55
+ outputs=[gr.Text(label="UCS")],
56
+ )
57
+
58
  app.launch()