Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ if not os.path.exists(extract_to):
|
|
| 14 |
with zipfile.ZipFile(zip_path, "r") as zf:
|
| 15 |
zf.extractall(extract_to)
|
| 16 |
|
| 17 |
-
predictor = TabularPredictor.load(extract_to)
|
| 18 |
|
| 19 |
def predict_tabular(height, width, depth, page_count):
|
| 20 |
# Validation
|
|
@@ -49,7 +49,7 @@ with gr.Blocks(title="Book Genre Predictor") as demo:
|
|
| 49 |
|
| 50 |
run_btn.click(
|
| 51 |
predict_tabular,
|
| 52 |
-
inputs=[height, width, depth, page_count
|
| 53 |
outputs=out
|
| 54 |
)
|
| 55 |
|
|
@@ -59,7 +59,7 @@ with gr.Blocks(title="Book Genre Predictor") as demo:
|
|
| 59 |
[24.0, 15.0, 2.2, 320],
|
| 60 |
[18.5, 12.0, 1.5, 180],
|
| 61 |
],
|
| 62 |
-
inputs=[height, width, depth, page_count
|
| 63 |
outputs=out
|
| 64 |
)
|
| 65 |
|
|
|
|
| 14 |
with zipfile.ZipFile(zip_path, "r") as zf:
|
| 15 |
zf.extractall(extract_to)
|
| 16 |
|
| 17 |
+
predictor = TabularPredictor.load(extract_to, require_py_version_match=False)
|
| 18 |
|
| 19 |
def predict_tabular(height, width, depth, page_count):
|
| 20 |
# Validation
|
|
|
|
| 49 |
|
| 50 |
run_btn.click(
|
| 51 |
predict_tabular,
|
| 52 |
+
inputs=[height, width, depth, page_count],
|
| 53 |
outputs=out
|
| 54 |
)
|
| 55 |
|
|
|
|
| 59 |
[24.0, 15.0, 2.2, 320],
|
| 60 |
[18.5, 12.0, 1.5, 180],
|
| 61 |
],
|
| 62 |
+
inputs=[height, width, depth, page_count],
|
| 63 |
outputs=out
|
| 64 |
)
|
| 65 |
|