TabPFN commited on
Commit
607ae4f
1 Parent(s): cc56a6c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -19,6 +19,10 @@ def compute(table: np.array):
19
  table = table[non_empty_row_mask]
20
  empty_mask = table == '(predict)'
21
  empty_inds = np.where(empty_mask)
 
 
 
 
22
  if not len(empty_inds[0]):
23
  return "⚠️ **ERROR: Please leave at least one field blank for prediction.**", None, None
24
  if not np.all(empty_inds[1][0] == empty_inds[1]):
@@ -116,10 +120,10 @@ def update_table(table):
116
 
117
  headers = []
118
 
119
- gr.Markdown("""This demo allows you to play with the **TabPFN**.
120
- The TabPFN will classify the values for all empty cells in the label column.
121
- Please, provide everything but the label column as numeric values.
122
- You can also upload datasets to fill the table automatically.
123
  """)
124
 
125
  with gr.Blocks() as demo:
 
19
  table = table[non_empty_row_mask]
20
  empty_mask = table == '(predict)'
21
  empty_inds = np.where(empty_mask)
22
+ if len(table.index) > 1024:
23
+ return "⚠️ **ERROR: TabPFN is not made for datasets with a trainingsize > 1024.**", None, None
24
+ if len(table.columns) > 100:
25
+ return "⚠️ **ERROR: TabPFN is not made for datasets with a feature size > 100.**", None, None
26
  if not len(empty_inds[0]):
27
  return "⚠️ **ERROR: Please leave at least one field blank for prediction.**", None, None
28
  if not np.all(empty_inds[1][0] == empty_inds[1]):
 
120
 
121
  headers = []
122
 
123
+ gr.Markdown("""This demo allows you to experiment with the **TabPFN** model for tabular data.
124
+
125
+ If you remove values in the target column, TabPFN will make predictions on them after clicking on the Button. The first 10 target values were already removed for this example dataset, so TabPFN will predict the first 10 classes.
126
+ Please, provide everything but the targets as numeric values and only remove values in one column (the target column).
127
  """)
128
 
129
  with gr.Blocks() as demo: