harshiv commited on
Commit
bc2dd7a
·
verified ·
1 Parent(s): 694267c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,7 +1,8 @@
1
  import gradio as gr
2
  import pandas as pd
3
  import pickle
4
- from sklearn.preprocessing import LabelEncoder
 
5
 
6
  # Load the trained model from data.pkl
7
  def load_model():
@@ -12,8 +13,7 @@ def load_model():
12
  # Define the prediction function using the loaded model
13
  def predict_user_profile(inputs):
14
  # Preprocess the input data
15
- lang_encoder = LabelEncoder()
16
- lang_code = lang_encoder.fit_transform([inputs['Language']])[0]
17
 
18
  # Create a DataFrame from the user input dictionary
19
  df = pd.DataFrame.from_dict([inputs])
 
1
  import gradio as gr
2
  import pandas as pd
3
  import pickle
4
+
5
+
6
 
7
  # Load the trained model from data.pkl
8
  def load_model():
 
13
  # Define the prediction function using the loaded model
14
  def predict_user_profile(inputs):
15
  # Preprocess the input data
16
+
 
17
 
18
  # Create a DataFrame from the user input dictionary
19
  df = pd.DataFrame.from_dict([inputs])