title: ValueError: Found input variables with inconsistent numbers of samples: [1, 137]
body: <p>I'm building a web app to make a model predict the User_input value (which in my case are 9 different sliders of the features contains different values) and to show the result and prediction accuracy at the end.
  So when I try to predict the User_input instead of X_test I get this error :
  ValueError: Found input variables with inconsistent numbers of samples: [1, 137]</p>
  <p>Here are the inputs I'm taking from the user :</p>
  <pre><code>def dataset_input(dataset_name):
  inputs = dict()
  
  user_input1=st.slider(&quot;Clump Thickness&quot;, 1, 10, step=1)
  user_input2=st.slider(&quot;Uniformity of Cell Size&quot;, 1, 10, step=1)
  user_input3=st.slider(&quot;Uniformity of Cell Shape&quot;, 1, 10, step=1)
  user_input4=st.slider(&quot;Marginal Adhesion&quot;, 1, 10, step=1)
  user_input5=st.slider(&quot;Single Epithelial Cell Size&quot;, 1, 10, step=1)
  user_input6=st.slider(&quot;Bare Nuclei&quot;, 1, 10, step = 1)
  user_input7=st.slider(&quot;Bland Chromatin&quot;, 1, 10, step=1)
  user_input8=st.slider(&quot;Normal Nucleoli&quot;, 1, 10, step=1)
  user_input9=st.slider(&quot;Mitoses&quot;, 1, 10, step = 1)
  inputs=[[user_input1, user_input2, user_input3, user_input4, user_input5,
       user_input6, user_input7, user_input8, user_input9]]
  return inputs
  
  inputs = dataset_input(dataset_name)
  </code></pre>
  <p>then I split the data and train the model :</p>
  <pre><code>X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.2, random_state=1234)
  
  clf.fit(X_train, y_train)
  </code></pre>
  <p>after that I want to show the predictions of the inputs of the user:</p>
  <pre><code>y_pred = clf.predict(inputs)
  #print(inputs)
  
  from sklearn.metrics import accuracy_score
  acc = accuracy_score(y_pred, y_test)
  print(acc)
  </code></pre>
  <p>If I put X_test instead of (inputs), it works fine, But I want the User_input.</p>
  <p>Also, when I print (inputs) I get a single prediction value which is a good thing, but I can't show the accuracy score.</p>
  <p>Here is the dataset link :
  <a href="https://archive.ics.uci.edu/ml/datasets/breast+cancer+wisconsin+%28original%29" rel="nofollow noreferrer">https://archive.ics.uci.edu/ml/datasets/breast+cancer+wisconsin+%28original%29</a></p>
  <p><a href="https://i.stack.imgur.com/AOHgH.png" rel="nofollow noreferrer">Here are the variables length after splitting the dataset</a></p>
  <p>I would appreciate the help! thank you.</p>
  <p>EDIT :
  I think I have this problem because my y_pred has 137 values compared to the (inputs) only one value, So I can't show the accuracy.
  Unfortunately IDK how to solve this issue .</p>