Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,7 +35,7 @@ def predict_tabular(height, width, depth, page_count):
|
|
| 35 |
df = pd.DataFrame([row])
|
| 36 |
pred = int(predictor.predict(df)[0])
|
| 37 |
|
| 38 |
-
return f"Predicted Genre Code: {
|
| 39 |
|
| 40 |
with gr.Blocks(title="Book Genre Predictor") as demo:
|
| 41 |
gr.Markdown("## Predict the Genre of a Book (Numeric Labels)")
|
|
@@ -47,7 +47,7 @@ with gr.Blocks(title="Book Genre Predictor") as demo:
|
|
| 47 |
depth = gr.Number(label="Depth (cm)", info="Book spine thickness in cm")
|
| 48 |
page_count = gr.Number(label="Page Count", info="Number of pages (positive integer)")
|
| 49 |
|
| 50 |
-
out = gr.
|
| 51 |
run_btn = gr.Button("Predict")
|
| 52 |
|
| 53 |
run_btn.click(
|
|
|
|
| 35 |
df = pd.DataFrame([row])
|
| 36 |
pred = int(predictor.predict(df)[0])
|
| 37 |
|
| 38 |
+
return f"Predicted Genre Code: {pred}"
|
| 39 |
|
| 40 |
with gr.Blocks(title="Book Genre Predictor") as demo:
|
| 41 |
gr.Markdown("## Predict the Genre of a Book (Numeric Labels)")
|
|
|
|
| 47 |
depth = gr.Number(label="Depth (cm)", info="Book spine thickness in cm")
|
| 48 |
page_count = gr.Number(label="Page Count", info="Number of pages (positive integer)")
|
| 49 |
|
| 50 |
+
out = gr.Textbox(label="Result")
|
| 51 |
run_btn = gr.Button("Predict")
|
| 52 |
|
| 53 |
run_btn.click(
|