vishalkryadav
commited on
Commit
•
b2bcf83
1
Parent(s):
b21a598
Update app.py
Browse files
app.py
CHANGED
@@ -114,7 +114,12 @@ def prediction(df):
|
|
114 |
#print(X_test.shape)
|
115 |
X_test_encoded = label_encoder(df)
|
116 |
X_test_df = preprocess_dataset(X_test_encoded)
|
117 |
-
x_model = loaded_model = tf.keras.models.load_model('my_model')
|
|
|
|
|
|
|
|
|
|
|
118 |
y_pred = x_model.predict(X_test_df)
|
119 |
#predicition = []
|
120 |
#for i in list(y_pred):
|
|
|
114 |
#print(X_test.shape)
|
115 |
X_test_encoded = label_encoder(df)
|
116 |
X_test_df = preprocess_dataset(X_test_encoded)
|
117 |
+
#x_model = loaded_model = tf.keras.models.load_model('my_model')
|
118 |
+
#x_model = tf.keras.models.load_model('my_model.h5')
|
119 |
+
try:
|
120 |
+
x_model = tf.keras.models.load_model('my_model.h5')
|
121 |
+
except:
|
122 |
+
x_model = tf.keras.layers.TFSMLayer('my_model', call_endpoint='serving_default')
|
123 |
y_pred = x_model.predict(X_test_df)
|
124 |
#predicition = []
|
125 |
#for i in list(y_pred):
|