Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse filesremoved the tome thing
app.py
CHANGED
@@ -82,8 +82,8 @@ def process_file(model_name,inc_slider,progress=Progress(track_tqdm=True)):
|
|
82 |
low_grad_schools = schools[schools['grad_rate'] < grad_rate_threshold]['school_number'].unique()
|
83 |
|
84 |
# Step 5: Sample percentage of schools from each group
|
85 |
-
high_sample = pd.Series(high_grad_schools).sample(frac=inc_slider/100
|
86 |
-
low_sample = pd.Series(low_grad_schools).sample(frac=inc_slider/100
|
87 |
|
88 |
# Step 6: Combine the sampled schools
|
89 |
random_schools = high_sample + low_sample
|
@@ -706,7 +706,6 @@ def process_file(model_name,inc_slider,progress=Progress(track_tqdm=True)):
|
|
706 |
---------------------------
|
707 |
Model: {model_name}
|
708 |
---------------------------\n
|
709 |
-
Time Taken: {result['time_taken_from_start']:.2f} seconds
|
710 |
Number of schools sampled: {len(random_schools)} / {len(unique_schools)}
|
711 |
Total number of instances from HGR schools : {len(high_indices)}
|
712 |
Total number of instances from LGR schools: {len(low_indices)}
|
@@ -1147,7 +1146,6 @@ button, select, .slider-percentage {
|
|
1147 |
}
|
1148 |
|
1149 |
|
1150 |
-
|
1151 |
'''
|
1152 |
# Define the file directory
|
1153 |
FILE_DIR = "fileHandler"
|
@@ -1209,7 +1207,7 @@ with gr.Blocks(theme='gstaff/sketch', css=custom_css) as demo:
|
|
1209 |
with gr.Row():
|
1210 |
gr.Markdown("Select a strategy from the dropdown")
|
1211 |
with gr.Row():
|
1212 |
-
file_dropdown = gr.Dropdown(choices=list_files(),
|
1213 |
download_button = gr.Button("Generate Strategies")
|
1214 |
with gr.Row():
|
1215 |
file_output = gr.File(label="Download File")
|
|
|
82 |
low_grad_schools = schools[schools['grad_rate'] < grad_rate_threshold]['school_number'].unique()
|
83 |
|
84 |
# Step 5: Sample percentage of schools from each group
|
85 |
+
high_sample = pd.Series(high_grad_schools).sample(frac=inc_slider/100).tolist()
|
86 |
+
low_sample = pd.Series(low_grad_schools).sample(frac=inc_slider/100).tolist()
|
87 |
|
88 |
# Step 6: Combine the sampled schools
|
89 |
random_schools = high_sample + low_sample
|
|
|
706 |
---------------------------
|
707 |
Model: {model_name}
|
708 |
---------------------------\n
|
|
|
709 |
Number of schools sampled: {len(random_schools)} / {len(unique_schools)}
|
710 |
Total number of instances from HGR schools : {len(high_indices)}
|
711 |
Total number of instances from LGR schools: {len(low_indices)}
|
|
|
1146 |
}
|
1147 |
|
1148 |
|
|
|
1149 |
'''
|
1150 |
# Define the file directory
|
1151 |
FILE_DIR = "fileHandler"
|
|
|
1207 |
with gr.Row():
|
1208 |
gr.Markdown("Select a strategy from the dropdown")
|
1209 |
with gr.Row():
|
1210 |
+
file_dropdown = gr.Dropdown(choices=list_files(),label=" ")
|
1211 |
download_button = gr.Button("Generate Strategies")
|
1212 |
with gr.Row():
|
1213 |
file_output = gr.File(label="Download File")
|