Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,7 @@
|
|
1 |
import pickle
|
2 |
import gradio as gr
|
3 |
|
4 |
-
|
5 |
-
def read_pickle(path, saved_model_name):
|
6 |
-
with open(path + saved_model_name + '.pickle', 'rb') as to_read:
|
7 |
-
model = pickle.load(to_read)
|
8 |
-
return model
|
9 |
-
|
10 |
-
# Load the pickled model
|
11 |
-
path = './' # Assuming the model file is in the current directory
|
12 |
-
model = read_pickle(path, "Automatidata_gui")
|
13 |
|
14 |
# Define the function for making predictions
|
15 |
def automatidata(VendorID, passenger_count, Distance, Duration, rush_hour):
|
|
|
1 |
import pickle
|
2 |
import gradio as gr
|
3 |
|
4 |
+
model = pickle.load('./Automatidata_gui.pickle')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
# Define the function for making predictions
|
7 |
def automatidata(VendorID, passenger_count, Distance, Duration, rush_hour):
|