Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ inputs = [
|
|
53 |
' 5th-6th', ' Assoc-voc', ' 9th', ' 12th', ' 1st-4th', ' Preschool'],
|
54 |
type='value', label='education', value=' Bachelors'),
|
55 |
gr.Slider(minimum=1, maximum=16, step=1, label='education_num', value=10),
|
56 |
-
gr.Radio(choices=['
|
57 |
type='value', label='marital_status', value=' Married-civ-spouse'),
|
58 |
gr.Radio(choices=[' Machine-op-inspct', ' Farming-fishing', ' Protective-serv', ' ?', ' Other-service', ' Prof-specialty', ' Craft-repair',
|
59 |
' Adm-clerical', ' Exec-managerial', ' Tech-support', ' Sales', ' Priv-house-serv', ' Transport-moving', ' Handlers-cleaners', ' Armed-Forces'],
|
@@ -81,11 +81,11 @@ description = 'Using Transformer to predict whether the income will be larger th
|
|
81 |
|
82 |
article = "Author: <a href=\"https://huggingface.co/geninhu\">Nhu Hoang</a>. Based on this <a href=\"https://keras.io/examples/structured_data/tabtransformer/\">keras example</a> by <a href=\"https://www.linkedin.com/in/khalid-salama-24403144\">Khalid Salama.</a> HuggingFace Model <a href=\"https://huggingface.co/keras-io/tab_transformer\">here</a> "
|
83 |
|
84 |
-
examples = [[39.0, '
|
85 |
-
[
|
86 |
-
[42.0, ' Private',' Masters', 14.0, ' Married-civ-spouse', ' Prof-specialty', ' Husband', ' Asian-Pac-Islander', ' Male',
|
87 |
-
[
|
88 |
-
[
|
89 |
|
90 |
gr.Interface(infer, inputs, output, examples= examples, allow_flagging='never',
|
91 |
title=title, description=description, article=article, live=False).launch(enable_queue=True, debug=True, inbrowser=True)
|
|
|
53 |
' 5th-6th', ' Assoc-voc', ' 9th', ' 12th', ' 1st-4th', ' Preschool'],
|
54 |
type='value', label='education', value=' Bachelors'),
|
55 |
gr.Slider(minimum=1, maximum=16, step=1, label='education_num', value=10),
|
56 |
+
gr.Radio(choices=['', ' Married-civ-spouse', ' Widowed', ' Divorced', ' Separated', ' Married-spouse-absent', ' Married-AF-spouse'],
|
57 |
type='value', label='marital_status', value=' Married-civ-spouse'),
|
58 |
gr.Radio(choices=[' Machine-op-inspct', ' Farming-fishing', ' Protective-serv', ' ?', ' Other-service', ' Prof-specialty', ' Craft-repair',
|
59 |
' Adm-clerical', ' Exec-managerial', ' Tech-support', ' Sales', ' Priv-house-serv', ' Transport-moving', ' Handlers-cleaners', ' Armed-Forces'],
|
|
|
81 |
|
82 |
article = "Author: <a href=\"https://huggingface.co/geninhu\">Nhu Hoang</a>. Based on this <a href=\"https://keras.io/examples/structured_data/tabtransformer/\">keras example</a> by <a href=\"https://www.linkedin.com/in/khalid-salama-24403144\">Khalid Salama.</a> HuggingFace Model <a href=\"https://huggingface.co/keras-io/tab_transformer\">here</a> "
|
83 |
|
84 |
+
examples = [[39.0, ' State-gov', ' Assoc-voc', 11.0, ' Divorced', ' Tech-support', ' Not-in-family', ' White', ' Female', 50000.0, 0.0, 40.0, ' Puerto-Rico'],
|
85 |
+
[65.0, ' Self-emp-inc', ' 12th', 8.0, ' Married-civ-spouse', ' Handlers-cleaners', ' Husband', ' Black', ' Male', 41000.0, 0.0, 55.0, ' United-States'],
|
86 |
+
[42.0, ' Private',' Masters', 14.0, ' Married-civ-spouse', ' Prof-specialty', ' Husband', ' Asian-Pac-Islander', ' Male', 35000.0, 0.0, 40.0, ' Taiwan',],
|
87 |
+
[25.0, ' Local-gov',' Bachelors', 13.0, ' Never-married', ' Craft-repair', ' Unmarried', ' White', ' Male', 75000.0, 0.0, 51.0, ' England'],
|
88 |
+
[57.0, ' Private', ' Masters', 14.0, ' Never-married', ' Prof-specialty', ' Not-in-family', ' Asian-Pac-Islander', ' Male', 150000.0, 0.0, 45.0, ' Iran']]
|
89 |
|
90 |
gr.Interface(infer, inputs, output, examples= examples, allow_flagging='never',
|
91 |
title=title, description=description, article=article, live=False).launch(enable_queue=True, debug=True, inbrowser=True)
|