Spaces:
Sleeping
Sleeping
Update app.py with transformer embeddings and prediction pipeline
Browse files
app.py
CHANGED
|
@@ -73,7 +73,8 @@ def predict_with_gpflow(model, X):
|
|
| 73 |
X_tensor = tf.convert_to_tensor(X, dtype=tf.float64)
|
| 74 |
print (X_tensor.shape)
|
| 75 |
# Get predictions
|
| 76 |
-
predict_fn = model.predict_f_compiled
|
|
|
|
| 77 |
mean, variance = predict_fn(Xnew=X_tensor)
|
| 78 |
|
| 79 |
# Return mean and variance as numpy arrays
|
|
|
|
| 73 |
X_tensor = tf.convert_to_tensor(X, dtype=tf.float64)
|
| 74 |
print (X_tensor.shape)
|
| 75 |
# Get predictions
|
| 76 |
+
#predict_fn = model.predict_f_compiled
|
| 77 |
+
predict_fn = model.signatures["serving_default"]
|
| 78 |
mean, variance = predict_fn(Xnew=X_tensor)
|
| 79 |
|
| 80 |
# Return mean and variance as numpy arrays
|