Spaces:
Runtime error
Runtime error
more tests with interface
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import pandas as pd
|
|
| 4 |
import pickle
|
| 5 |
|
| 6 |
|
| 7 |
-
def infer(
|
| 8 |
|
| 9 |
with open('df_model.bin', 'rb') as f:
|
| 10 |
(encoder_engine, encoder_transmission, encoder_cooling, model) = pickle.load(f)
|
|
@@ -30,7 +30,7 @@ def infer(specs):
|
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
-
X = [
|
| 34 |
|
| 35 |
|
| 36 |
|
|
@@ -64,8 +64,7 @@ with gr.Blocks() as demo:
|
|
| 64 |
"""
|
| 65 |
#Choose the number of the cooling system type:
|
| 66 |
[0]Air [1]Liquid [2]Oil & Air
|
| 67 |
-
"""
|
| 68 |
-
)
|
| 69 |
cooling = gr.Number(label="Number of cooling system type")
|
| 70 |
|
| 71 |
specs = [cylinder, bore, stroke, cooling]
|
|
|
|
| 4 |
import pickle
|
| 5 |
|
| 6 |
|
| 7 |
+
def infer(cylinder, bore, stroke, cooling):
|
| 8 |
|
| 9 |
with open('df_model.bin', 'rb') as f:
|
| 10 |
(encoder_engine, encoder_transmission, encoder_cooling, model) = pickle.load(f)
|
|
|
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
+
X = [[cylinder, bore, stroke, cooling]]
|
| 34 |
|
| 35 |
|
| 36 |
|
|
|
|
| 64 |
"""
|
| 65 |
#Choose the number of the cooling system type:
|
| 66 |
[0]Air [1]Liquid [2]Oil & Air
|
| 67 |
+
""")
|
|
|
|
| 68 |
cooling = gr.Number(label="Number of cooling system type")
|
| 69 |
|
| 70 |
specs = [cylinder, bore, stroke, cooling]
|