Update app.py
Browse files
app.py
CHANGED
@@ -39,29 +39,27 @@ description1 = """This app takes info from subjects and predicts their graduatio
|
|
39 |
description2 = """
|
40 |
To use the app, click on one of the examples, or adjust the values of the factors, and click on Analyze. π€
|
41 |
"""
|
42 |
-
|
43 |
-
with gr.Blocks(theme=gr.themes.Default(primary_hue="red", secondary_hue="blue", neutral_hue="cyan")) as demo:
|
44 |
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
|
66 |
submit_btn.click(
|
67 |
main_func,
|
|
|
39 |
description2 = """
|
40 |
To use the app, click on one of the examples, or adjust the values of the factors, and click on Analyze. π€
|
41 |
"""
|
|
|
|
|
42 |
|
43 |
+
with gr.Blocks(title=title) as demo:
|
44 |
+
gr.Markdown(f"## {title}")
|
45 |
+
gr.Markdown(description1)
|
46 |
+
gr.Markdown("""---""")
|
47 |
+
gr.Markdown(description2)
|
48 |
+
gr.Markdown("""---""")
|
49 |
+
with gr.Row():
|
50 |
+
with gr.Column():
|
51 |
+
Admission_Grade = gr.Slider(label="Admission Grade", minimum=0, maximum=200, value=100, step=1)
|
52 |
+
Age_at_Enrollment = gr.Slider(label="Age at Enrollment", minimum=10, maximum=80, value=40, step=1)
|
53 |
+
Previous_Qualification_Grade = gr.Slider(label="Previous Qualification Grade", minimum=0, maximum=200, value=100, step=1)
|
54 |
+
First_Sem_Grades = gr.Slider(label="First Semester Grade", minimum=0, maximum=20, value=10, step=1)
|
55 |
+
Second_Sem_Grades = gr.Slider(label="Second Semester Grade", minimum=0, maximum=20, value=10, step=1)
|
56 |
+
Course = gr.Dropdown(label="Select a Course:", choices=[33,171,8014,9003,9070,9085,9119,9130,9147,9238,9254,9500,9556,9670,9773,9853,9991], value=33)
|
57 |
+
Second_Sem_Units_Approved = gr.Slider(label="Second Semester Units Approved", minimum=0, maximum=20, value=10, step=1)
|
58 |
+
submit_btn = gr.Button("Analyze")
|
59 |
|
60 |
+
with gr.Column(visible=True) as output_col:
|
61 |
+
label = gr.Label(label = "Predicted Label")
|
62 |
+
local_plot = gr.Plot(label = 'Shap:')
|
63 |
|
64 |
submit_btn.click(
|
65 |
main_func,
|