Spaces:
Build error
Build error
Samuel Mueller
commited on
Commit
·
dffd66c
1
Parent(s):
67673f2
fixed base_path
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import sys
|
2 |
-
|
|
|
3 |
from scripts.transformer_prediction_interface import TabPFNClassifier
|
4 |
|
5 |
import numpy as np
|
@@ -33,7 +34,7 @@ def compute(table: np.array):
|
|
33 |
except ValueError:
|
34 |
return "**Please only add numbers (to the inputs) or leave fields empty.**", None
|
35 |
|
36 |
-
classifier = TabPFNClassifier(base_path=
|
37 |
classifier.fit(x_train, y_train)
|
38 |
y_eval, p_eval = classifier.predict(x_eval, return_winning_probability=True)
|
39 |
|
|
|
1 |
import sys
|
2 |
+
tabpfn_path = 'TabPFN'
|
3 |
+
sys.path.insert(0,tabpfn_path) # our submodule of the TabPFN repo (at 045c8400203ebd062346970b4f2c0ccda5a40618)
|
4 |
from scripts.transformer_prediction_interface import TabPFNClassifier
|
5 |
|
6 |
import numpy as np
|
|
|
34 |
except ValueError:
|
35 |
return "**Please only add numbers (to the inputs) or leave fields empty.**", None
|
36 |
|
37 |
+
classifier = TabPFNClassifier(base_path=tabpfn_path, device='cpu')
|
38 |
classifier.fit(x_train, y_train)
|
39 |
y_eval, p_eval = classifier.predict(x_eval, return_winning_probability=True)
|
40 |
|