matheuscvp commited on
Commit
c109ee3
·
1 Parent(s): 0c4af3f

adding a second model

Browse files
Files changed (2) hide show
  1. app.py +4 -1
  2. model2.pkl +3 -0
app.py CHANGED
@@ -21,6 +21,8 @@ options = [
21
  with open("model.pkl", "rb") as f:
22
  model = pickle.load(f)
23
 
 
 
24
 
25
  def predict(wind, temp_max, temp_min, precipitation):
26
  f_precipitation = float(precipitation)
@@ -38,8 +40,9 @@ def predict(wind, temp_max, temp_min, precipitation):
38
  df = pd.DataFrame([default], columns=default_columns)
39
 
40
  prediction = model.predict(df)
 
41
 
42
- return options[round(max(prediction))]
43
 
44
  iface = gr.Interface(
45
  fn=predict,
 
21
  with open("model.pkl", "rb") as f:
22
  model = pickle.load(f)
23
 
24
+ with open("model2.pkl", "rb") as f:
25
+ model2 = pickle.load(f)
26
 
27
  def predict(wind, temp_max, temp_min, precipitation):
28
  f_precipitation = float(precipitation)
 
40
  df = pd.DataFrame([default], columns=default_columns)
41
 
42
  prediction = model.predict(df)
43
+ prediction2 = model2.predict(df)
44
 
45
+ return {options[round(max(prediction))], options[round(max(prediction2))]}
46
 
47
  iface = gr.Interface(
48
  fn=predict,
model2.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:32e70a41159435f0182728e1970658f37b7d018b2e78329309bec5d3f8b4803a
3
+ size 2901