Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
revised
Browse files
app.py
CHANGED
|
@@ -11,15 +11,15 @@ from sklearn.metrics import roc_curve, auc
|
|
| 11 |
|
| 12 |
def process_file(file,label,info, model_name):
|
| 13 |
|
| 14 |
-
with open(file.name, 'r') as f:
|
| 15 |
-
|
| 16 |
-
saved_test_dataset = "train.txt"
|
| 17 |
-
saved_test_label = "train_label.txt"
|
| 18 |
-
saved_train_info="train_info.txt"
|
| 19 |
-
# Save the uploaded file content to a specified location
|
| 20 |
-
shutil.copyfile(file.name, saved_test_dataset)
|
| 21 |
-
shutil.copyfile(label.name, saved_test_label)
|
| 22 |
-
shutil.copyfile(info.name, saved_train_info)
|
| 23 |
# For demonstration purposes, we'll just return the content with the selected model name
|
| 24 |
# if(model_name=="highGRschool10"):
|
| 25 |
# checkpoint="ratio_proportion_change3/output/FS/bert_fine_tuned.model.ep32"
|
|
@@ -35,13 +35,13 @@ def process_file(file,label,info, model_name):
|
|
| 35 |
"python", "new_test_saved_finetuned_model.py",
|
| 36 |
"-workspace_name", "ratio_proportion_change3_2223/sch_largest_100-coded",
|
| 37 |
"-finetune_task", model_name,
|
| 38 |
-
"-test_dataset_path","../../../../train.txt",
|
| 39 |
# "-test_label_path","../../../../train_label.txt",
|
| 40 |
"-finetuned_bert_classifier_checkpoint",
|
| 41 |
"ratio_proportion_change3_2223/sch_largest_100-coded/output/highGRschool10/bert_fine_tuned.model.ep42",
|
| 42 |
"-e",str(1),
|
| 43 |
"-b",str(5)
|
| 44 |
-
]
|
| 45 |
|
| 46 |
result = {}
|
| 47 |
with open("result.txt", 'r') as file:
|
|
|
|
| 11 |
|
| 12 |
def process_file(file,label,info, model_name):
|
| 13 |
|
| 14 |
+
# with open(file.name, 'r') as f:
|
| 15 |
+
# content = f.read()
|
| 16 |
+
# saved_test_dataset = "train.txt"
|
| 17 |
+
# saved_test_label = "train_label.txt"
|
| 18 |
+
# saved_train_info="train_info.txt"
|
| 19 |
+
# # Save the uploaded file content to a specified location
|
| 20 |
+
# shutil.copyfile(file.name, saved_test_dataset)
|
| 21 |
+
# shutil.copyfile(label.name, saved_test_label)
|
| 22 |
+
# shutil.copyfile(info.name, saved_train_info)
|
| 23 |
# For demonstration purposes, we'll just return the content with the selected model name
|
| 24 |
# if(model_name=="highGRschool10"):
|
| 25 |
# checkpoint="ratio_proportion_change3/output/FS/bert_fine_tuned.model.ep32"
|
|
|
|
| 35 |
"python", "new_test_saved_finetuned_model.py",
|
| 36 |
"-workspace_name", "ratio_proportion_change3_2223/sch_largest_100-coded",
|
| 37 |
"-finetune_task", model_name,
|
| 38 |
+
# "-test_dataset_path","../../../../train.txt",
|
| 39 |
# "-test_label_path","../../../../train_label.txt",
|
| 40 |
"-finetuned_bert_classifier_checkpoint",
|
| 41 |
"ratio_proportion_change3_2223/sch_largest_100-coded/output/highGRschool10/bert_fine_tuned.model.ep42",
|
| 42 |
"-e",str(1),
|
| 43 |
"-b",str(5)
|
| 44 |
+
])
|
| 45 |
|
| 46 |
result = {}
|
| 47 |
with open("result.txt", 'r') as file:
|