Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,6 +17,8 @@ def greed(Measure,Line_Item_Quantity,Line_Item_Value,Weight,Freight_Cost,Line_It
|
|
| 17 |
input_array=np.array([[Measure,Line_Item_Quantity,Line_Item_Value,Weight,Freight_Cost,Line_Item_Insurance]])
|
| 18 |
pred1=model1.predict(input_array)
|
| 19 |
pred2=model2.predict(input_array)
|
|
|
|
|
|
|
| 20 |
return pred1,pred2
|
| 21 |
|
| 22 |
|
|
@@ -26,6 +28,5 @@ output2=gr.outputs.Textbox(label='unit price')
|
|
| 26 |
demo = gr.Interface(
|
| 27 |
fn=greed,
|
| 28 |
inputs=[gr.inputs.Number(),gr.inputs.Number(),gr.inputs.Number(),gr.inputs.Number(),gr.inputs.Number(),gr.inputs.Number()],
|
| 29 |
-
outputs=[output1,output2],
|
| 30 |
-
)
|
| 31 |
demo.launch(share=True)
|
|
|
|
| 17 |
input_array=np.array([[Measure,Line_Item_Quantity,Line_Item_Value,Weight,Freight_Cost,Line_Item_Insurance]])
|
| 18 |
pred1=model1.predict(input_array)
|
| 19 |
pred2=model2.predict(input_array)
|
| 20 |
+
pred1=float(np.asarray(pred1))
|
| 21 |
+
pred2=float(np.asarray(pred2))
|
| 22 |
return pred1,pred2
|
| 23 |
|
| 24 |
|
|
|
|
| 28 |
demo = gr.Interface(
|
| 29 |
fn=greed,
|
| 30 |
inputs=[gr.inputs.Number(),gr.inputs.Number(),gr.inputs.Number(),gr.inputs.Number(),gr.inputs.Number(),gr.inputs.Number()],
|
| 31 |
+
outputs=[output1,output2],description='SHIPMENT PRICING PREDCITION')
|
|
|
|
| 32 |
demo.launch(share=True)
|