ElPierrito commited on
Commit
98b882e
·
verified ·
1 Parent(s): c0a19ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -18,8 +18,6 @@ df.columns = (
18
  df.columns
19
  .str.strip()
20
  .str.replace(" ", " ", regex=False) # geschützte Leerzeichen
21
- .str.replace("CHF", "€")
22
- .str.replace("grösse", "größe")
23
  )
24
 
25
  # Datum verarbeiten
@@ -35,14 +33,14 @@ else:
35
 
36
  X = df[[
37
  "Kundentyp", "Branche", "Produktgruppe", "Region", "Kanal",
38
- "Dringlichkeit", "Wochentag", "Anfrage_Text", "Projektgröße €"
39
  ]]
40
  y = df["Abschluss"]
41
 
42
  categorical_features = ["Kundentyp", "Branche", "Produktgruppe", "Region",
43
  "Kanal", "Dringlichkeit", "Wochentag"]
44
  text_feature = "Anfrage_Text"
45
- numeric_feature = "Projektgröße €"
46
 
47
  # ----------------------------
48
  # 🧠 Modell-Pipeline
@@ -77,7 +75,7 @@ def predict_lead(kundentyp, branche, produktgruppe, region, kanal,
77
  "Dringlichkeit": dringlichkeit,
78
  "Wochentag": wochentag,
79
  "Anfrage_Text": anfrage_text,
80
- "Projektgröße €": float(projektgroesse)
81
  }])
82
 
83
  prob = pipeline.predict_proba(input_data)[0][1]
 
18
  df.columns
19
  .str.strip()
20
  .str.replace(" ", " ", regex=False) # geschützte Leerzeichen
 
 
21
  )
22
 
23
  # Datum verarbeiten
 
33
 
34
  X = df[[
35
  "Kundentyp", "Branche", "Produktgruppe", "Region", "Kanal",
36
+ "Dringlichkeit", "Wochentag", "Anfrage_Text", "Projektgröße ()"
37
  ]]
38
  y = df["Abschluss"]
39
 
40
  categorical_features = ["Kundentyp", "Branche", "Produktgruppe", "Region",
41
  "Kanal", "Dringlichkeit", "Wochentag"]
42
  text_feature = "Anfrage_Text"
43
+ numeric_feature = "Projektgröße ()"
44
 
45
  # ----------------------------
46
  # 🧠 Modell-Pipeline
 
75
  "Dringlichkeit": dringlichkeit,
76
  "Wochentag": wochentag,
77
  "Anfrage_Text": anfrage_text,
78
+ "Projektgröße ()": float(projektgroesse)
79
  }])
80
 
81
  prob = pipeline.predict_proba(input_data)[0][1]