Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
import pandas as pd
|
3 |
import pickle
|
4 |
-
|
|
|
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 |
-
|
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])
|