Spaces:
Running
Running
Update app.py
Browse fileschanged model name
app.py
CHANGED
|
@@ -34,21 +34,27 @@ def process_file(model_name,inc_slider,progress=Progress(track_tqdm=True)):
|
|
| 34 |
label_location=parent_location+"overallTestData/test_label.txt"
|
| 35 |
# "ASTRA-FT-HGR-RANDOM10", "ASTRA-FT-FIRST10-WSKILLS", "ASTRA-FT-FIRST10-WTIME", "ASTRA-FT-FIRST10-WSKILLS_WTIME"
|
| 36 |
checkpoint = "ratio_proportion_change3_2223/sch_largest_100-coded/output/"
|
| 37 |
-
if(model_name=="ASTRA-FT-HGR
|
| 38 |
finetune_task="highGRschool10"
|
| 39 |
checkpoint += "highGRschool10/bert_fine_tuned.model.ep42"
|
|
|
|
| 40 |
elif(model_name== "ASTRA-FT-LGR" ):
|
| 41 |
finetune_task="lowGRschoolAll"
|
|
|
|
| 42 |
elif(model_name=="ASTRA-FT-FULL"):
|
| 43 |
finetune_task="fullTest"
|
| 44 |
-
|
|
|
|
| 45 |
finetune_task="first10"
|
| 46 |
-
if model_name == "ASTRA-FT-
|
| 47 |
checkpoint += "first10/bert_fine_tuned.model.first10%.wskills.ep24"
|
| 48 |
-
|
|
|
|
| 49 |
checkpoint += "first10/bert_fine_tuned.model.first10%.wfaopttime.wttime.wttopttime.wttnoopttime.ep23"
|
| 50 |
-
|
|
|
|
| 51 |
checkpoint += "first10/bert_fine_tuned.model.first10%.wskills.wfaopttime.wttime.wttopttime.wttnoopttime.ep40"
|
|
|
|
| 52 |
else:
|
| 53 |
finetune_task=None
|
| 54 |
# Load the test_info file and the graduation rate file
|
|
@@ -132,7 +138,7 @@ def process_file(model_name,inc_slider,progress=Progress(track_tqdm=True)):
|
|
| 132 |
subprocess.run([
|
| 133 |
"python", "new_test_saved_finetuned_model.py",
|
| 134 |
"-workspace_name", "ratio_proportion_change3_2223/sch_largest_100-coded",
|
| 135 |
-
"-model_name",
|
| 136 |
"-finetune_task", finetune_task,
|
| 137 |
"-test_dataset_path","../../../../fileHandler/selected_rows.txt",
|
| 138 |
# "-test_label_path","../../../../train_label.txt",
|
|
@@ -778,7 +784,7 @@ def process_file(model_name,inc_slider,progress=Progress(track_tqdm=True)):
|
|
| 778 |
|
| 779 |
# models = ["ASTRA-FT-HGR", "ASTRA-FT-LGR", "ASTRA-FT-FULL"]
|
| 780 |
# models = ["ASTRA-FT-HGR", "ASTRA-FT-FULL"]
|
| 781 |
-
models = ["ASTRA-FT-HGR
|
| 782 |
|
| 783 |
content = """
|
| 784 |
<h1 style="color: black;">A S T R A</h1>
|
|
|
|
| 34 |
label_location=parent_location+"overallTestData/test_label.txt"
|
| 35 |
# "ASTRA-FT-HGR-RANDOM10", "ASTRA-FT-FIRST10-WSKILLS", "ASTRA-FT-FIRST10-WTIME", "ASTRA-FT-FIRST10-WSKILLS_WTIME"
|
| 36 |
checkpoint = "ratio_proportion_change3_2223/sch_largest_100-coded/output/"
|
| 37 |
+
if(model_name=="ASTRA-FT-HGR"):
|
| 38 |
finetune_task="highGRschool10"
|
| 39 |
checkpoint += "highGRschool10/bert_fine_tuned.model.ep42"
|
| 40 |
+
model_task="ASTRA-FT-HGR-RANDOM10"
|
| 41 |
elif(model_name== "ASTRA-FT-LGR" ):
|
| 42 |
finetune_task="lowGRschoolAll"
|
| 43 |
+
model_task="ASTRA-FT-LGR"
|
| 44 |
elif(model_name=="ASTRA-FT-FULL"):
|
| 45 |
finetune_task="fullTest"
|
| 46 |
+
model_task="ASTRA-FT-FULL"
|
| 47 |
+
elif(model_name in ["ASTRA-FT-Skills", "ASTRA-FT-Temporal", "ASTRA-FT-Unified"]):
|
| 48 |
finetune_task="first10"
|
| 49 |
+
if model_name == "ASTRA-FT-Skills":
|
| 50 |
checkpoint += "first10/bert_fine_tuned.model.first10%.wskills.ep24"
|
| 51 |
+
model_task="ASTRA-FT-FIRST10-WSKILLS"
|
| 52 |
+
elif model_name == "ASTRA-FT-Temporal":
|
| 53 |
checkpoint += "first10/bert_fine_tuned.model.first10%.wfaopttime.wttime.wttopttime.wttnoopttime.ep23"
|
| 54 |
+
model_task="ASTRA-FT-FIRST10-WTIME"
|
| 55 |
+
elif model_name == "ASTRA-FT-Unified":
|
| 56 |
checkpoint += "first10/bert_fine_tuned.model.first10%.wskills.wfaopttime.wttime.wttopttime.wttnoopttime.ep40"
|
| 57 |
+
model_task="ASTRA-FT-FIRST10-WSKILLS_WTIME"
|
| 58 |
else:
|
| 59 |
finetune_task=None
|
| 60 |
# Load the test_info file and the graduation rate file
|
|
|
|
| 138 |
subprocess.run([
|
| 139 |
"python", "new_test_saved_finetuned_model.py",
|
| 140 |
"-workspace_name", "ratio_proportion_change3_2223/sch_largest_100-coded",
|
| 141 |
+
"-model_name", model_task,
|
| 142 |
"-finetune_task", finetune_task,
|
| 143 |
"-test_dataset_path","../../../../fileHandler/selected_rows.txt",
|
| 144 |
# "-test_label_path","../../../../train_label.txt",
|
|
|
|
| 784 |
|
| 785 |
# models = ["ASTRA-FT-HGR", "ASTRA-FT-LGR", "ASTRA-FT-FULL"]
|
| 786 |
# models = ["ASTRA-FT-HGR", "ASTRA-FT-FULL"]
|
| 787 |
+
models = ["ASTRA-FT-HGR", "ASTRA-FT-Skills", "ASTRA-FT-Temporal", "ASTRA-FT-Unified"]
|
| 788 |
|
| 789 |
content = """
|
| 790 |
<h1 style="color: black;">A S T R A</h1>
|