Skip to content

Commit

Permalink
Adds new line and uses X_test
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarust committed Jan 10, 2023
1 parent cbeea52 commit 441c2a5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/plot_tabular_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
# Inference
# =========
# Let's see if the model works.
prediction_data = [[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]]
prediction_data = X_test[:5]
prediction = model.predict(prediction_data)
print(prediction)

Expand All @@ -80,6 +80,10 @@
data=X_test,
)

if "__file__" in locals(): # __file__ not defined during docs built
# Add this script itself to the files to be uploaded for reproducibility
hub_utils.add_files(__file__, dst=local_repo)

# %%
# Create a model card
# ===================
Expand Down Expand Up @@ -145,4 +149,4 @@
# to push your models please refer to
# :ref:`this example <sphx_glr_auto_examples_plot_hf_hub.py>`.

model_card.save(Path(local_repo) / "README.md")
model_card.save(Path(local_repo) / "README.md")

0 comments on commit 441c2a5

Please sign in to comment.