Update app.py
Browse files
app.py
CHANGED
@@ -31,11 +31,13 @@ def predict_score(essay_text, gender, race_ethnicity, disability, disadvantaged,
|
|
31 |
|
32 |
# Prepare metadata as dict
|
33 |
metadata_input = {
|
34 |
-
"gender":
|
35 |
-
"race_ethnicity":
|
36 |
-
"
|
37 |
-
"
|
38 |
-
"
|
|
|
|
|
39 |
}
|
40 |
|
41 |
# Convert to array in correct order
|
@@ -59,9 +61,11 @@ iface = gr.Interface(
|
|
59 |
gr.Textbox(label="Essay Text", lines=10, placeholder="Paste your essay here..."),
|
60 |
gr.Dropdown(["Male", "Female", "Other"], label="Gender"),
|
61 |
gr.Dropdown(["Asian", "Black", "Hispanic", "White", "Other"], label="Race/Ethnicity"),
|
62 |
-
gr.Dropdown(["
|
|
|
63 |
gr.Dropdown(["Yes", "No"], label="Economically Disadvantaged"),
|
64 |
-
gr.Dropdown(["Yes", "No"], label="
|
|
|
65 |
],
|
66 |
outputs=gr.Number(label="Predicted Essay Score"),
|
67 |
title="Automated Essay Scoring App"
|
|
|
31 |
|
32 |
# Prepare metadata as dict
|
33 |
metadata_input = {
|
34 |
+
"gender": "female",
|
35 |
+
"race_ethnicity": "Asian",
|
36 |
+
"assignment": "Informative", # ✅ must be here
|
37 |
+
"prompt_name": "Education Benefits",
|
38 |
+
"economically_disadvantaged": "No",
|
39 |
+
"student_disability_status": "None",
|
40 |
+
"ell_status": "No"
|
41 |
}
|
42 |
|
43 |
# Convert to array in correct order
|
|
|
61 |
gr.Textbox(label="Essay Text", lines=10, placeholder="Paste your essay here..."),
|
62 |
gr.Dropdown(["Male", "Female", "Other"], label="Gender"),
|
63 |
gr.Dropdown(["Asian", "Black", "Hispanic", "White", "Other"], label="Race/Ethnicity"),
|
64 |
+
gr.Dropdown(["Informative", "Argumentative", "Narrative"], label="Assignment"), # ✅ ADD
|
65 |
+
gr.Dropdown(["Education Benefits", "Technology Impact", "Climate Change"], label="Prompt Name"), # ✅ ADD
|
66 |
gr.Dropdown(["Yes", "No"], label="Economically Disadvantaged"),
|
67 |
+
gr.Dropdown(["Yes", "No"], label="Student has Disability"),
|
68 |
+
gr.Dropdown(["Yes", "No"], label="ELL Status"),
|
69 |
],
|
70 |
outputs=gr.Number(label="Predicted Essay Score"),
|
71 |
title="Automated Essay Scoring App"
|