Parthebhan commited on
Commit
e600212
·
verified ·
1 Parent(s): 56bcedf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -9
app.py CHANGED
@@ -1,15 +1,7 @@
1
  import pickle
2
  import gradio as gr
3
 
4
- # Define the function to read the pickled model
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):