coadyo commited on
Commit
e1d9799
β€’
1 Parent(s): 452662f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -21
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
- with gr.Blocks(title=title) as demo:
46
- gr.Markdown(f"## {title}")
47
- gr.Markdown(description1)
48
- gr.Markdown("""---""")
49
- gr.Markdown(description2)
50
- gr.Markdown("""---""")
51
- with gr.Row():
52
- with gr.Column():
53
- Admission_Grade = gr.Slider(label="Admission Grade", minimum=0, maximum=200, value=100, step=1)
54
- Age_at_Enrollment = gr.Slider(label="Age at Enrollment", minimum=10, maximum=80, value=40, step=1)
55
- Previous_Qualification_Grade = gr.Slider(label="Previous Qualification Grade", minimum=0, maximum=200, value=100, step=1)
56
- First_Sem_Grades = gr.Slider(label="First Semester Grade", minimum=0, maximum=20, value=10, step=1)
57
- Second_Sem_Grades = gr.Slider(label="Second Semester Grade", minimum=0, maximum=20, value=10, step=1)
58
- 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)
59
- Second_Sem_Units_Approved = gr.Slider(label="Second Semester Units Approved", minimum=0, maximum=20, value=10, step=1)
60
- submit_btn = gr.Button("Analyze")
61
 
62
- with gr.Column(visible=True) as output_col:
63
- label = gr.Label(label = "Predicted Label")
64
- local_plot = gr.Plot(label = 'Shap:')
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,