Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ project = hopsworks.login()
|
|
41 |
fs = project.get_feature_store()
|
42 |
|
43 |
mr = project.get_model_registry()
|
44 |
-
model = mr.get_model("salary_model", version=
|
45 |
model_dir = model.download()
|
46 |
model = joblib.load(model_dir + "/model.pkl")
|
47 |
print("Model downloaded")
|
@@ -181,13 +181,13 @@ demo = gr.Interface(
|
|
181 |
description="Prediction of the salary in USD",
|
182 |
allow_flagging="never",
|
183 |
inputs=[
|
184 |
-
gr.components.Number(label='
|
185 |
-
gr.components.Select(label='
|
186 |
-
gr.components.Select(label='
|
187 |
-
gr.components.Select(label='
|
188 |
-
gr.components.Select(label='
|
189 |
-
gr.components.TextInput(label='
|
190 |
],
|
191 |
outputs=gr.Text())
|
192 |
|
193 |
-
demo.launch(debug=True)
|
|
|
41 |
fs = project.get_feature_store()
|
42 |
|
43 |
mr = project.get_model_registry()
|
44 |
+
model = mr.get_model("salary_model", version=5)
|
45 |
model_dir = model.download()
|
46 |
model = joblib.load(model_dir + "/model.pkl")
|
47 |
print("Model downloaded")
|
|
|
181 |
description="Prediction of the salary in USD",
|
182 |
allow_flagging="never",
|
183 |
inputs=[
|
184 |
+
gr.components.Number(label='work_year'),
|
185 |
+
gr.components.Select(label='experience_level', options=['EN', 'MI', 'SE', 'EX']),
|
186 |
+
gr.components.Select(label='company_size', options=['S', 'M', 'L']),
|
187 |
+
gr.components.Select(label='currency', options=['EUR', 'GBP', 'USD']),
|
188 |
+
gr.components.Select(label='job_title', options=job_title_options),
|
189 |
+
gr.components.TextInput(label='country')
|
190 |
],
|
191 |
outputs=gr.Text())
|
192 |
|
193 |
+
demo.launch(debug=True)
|