Spaces:
Runtime error
Runtime error
Commit
•
c377810
1
Parent(s):
d62bbe0
Upload folder using huggingface_hub
Browse files
04_finetuning_approaches/generate_training_question.ipynb
CHANGED
@@ -47,7 +47,7 @@
|
|
47 |
},
|
48 |
{
|
49 |
"cell_type": "code",
|
50 |
-
"execution_count":
|
51 |
"metadata": {},
|
52 |
"outputs": [
|
53 |
{
|
@@ -57,8 +57,8 @@
|
|
57 |
"traceback": [
|
58 |
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
|
59 |
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
|
60 |
-
"Cell \u001b[1;32mIn[
|
61 |
-
"Cell \u001b[1;32mIn[
|
62 |
"\u001b[1;31mNameError\u001b[0m: name 'pd' is not defined"
|
63 |
]
|
64 |
}
|
@@ -70,7 +70,6 @@
|
|
70 |
" # Read the cleaned excel file\n",
|
71 |
" df = pd.read_excel(file_path)\n",
|
72 |
" \n",
|
73 |
-
" # Create a new dataframe for training data\n",
|
74 |
" training_data = pd.DataFrame(columns=['id', 'annotator', 'position', 'question', 'table_file', 'answer_coordinates', 'answer_text'])\n",
|
75 |
" \n",
|
76 |
" # Define a list of possible question formulations\n",
|
|
|
47 |
},
|
48 |
{
|
49 |
"cell_type": "code",
|
50 |
+
"execution_count": 2,
|
51 |
"metadata": {},
|
52 |
"outputs": [
|
53 |
{
|
|
|
57 |
"traceback": [
|
58 |
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
|
59 |
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
|
60 |
+
"Cell \u001b[1;32mIn[2], line 29\u001b[0m\n\u001b[0;32m 25\u001b[0m training_data\u001b[39m.\u001b[39mto_excel(\u001b[39m'\u001b[39m\u001b[39mfelix_playground_SQA_Training/module_guide_sq_abbreviation.xlsx\u001b[39m\u001b[39m'\u001b[39m, index\u001b[39m=\u001b[39m\u001b[39mFalse\u001b[39;00m)\n\u001b[0;32m 27\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39m\"\u001b[39m\u001b[39mTraining data created and saved as \u001b[39m\u001b[39m'\u001b[39m\u001b[39mtraining_data.xlsx\u001b[39m\u001b[39m'\u001b[39m\u001b[39m.\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[1;32m---> 29\u001b[0m create_training_data_abbreviation(\u001b[39m\"\u001b[39;49m\u001b[39mfelix_playground_SQA_Training/MS_IS_all_modules_cleaned.xlsx\u001b[39;49m\u001b[39m\"\u001b[39;49m)\n",
|
61 |
+
"Cell \u001b[1;32mIn[2], line 5\u001b[0m, in \u001b[0;36mcreate_training_data_abbreviation\u001b[1;34m(file_path)\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mcreate_training_data_abbreviation\u001b[39m(file_path):\n\u001b[0;32m 4\u001b[0m \u001b[39m# Read the cleaned excel file\u001b[39;00m\n\u001b[1;32m----> 5\u001b[0m df \u001b[39m=\u001b[39m pd\u001b[39m.\u001b[39mread_excel(file_path)\n\u001b[0;32m 7\u001b[0m \u001b[39m# Create a new dataframe for training data\u001b[39;00m\n\u001b[0;32m 8\u001b[0m training_data \u001b[39m=\u001b[39m pd\u001b[39m.\u001b[39mDataFrame(columns\u001b[39m=\u001b[39m[\u001b[39m'\u001b[39m\u001b[39mid\u001b[39m\u001b[39m'\u001b[39m, \u001b[39m'\u001b[39m\u001b[39mannotator\u001b[39m\u001b[39m'\u001b[39m, \u001b[39m'\u001b[39m\u001b[39mposition\u001b[39m\u001b[39m'\u001b[39m, \u001b[39m'\u001b[39m\u001b[39mquestion\u001b[39m\u001b[39m'\u001b[39m, \u001b[39m'\u001b[39m\u001b[39mtable_file\u001b[39m\u001b[39m'\u001b[39m, \u001b[39m'\u001b[39m\u001b[39manswer_coordinates\u001b[39m\u001b[39m'\u001b[39m, \u001b[39m'\u001b[39m\u001b[39manswer_text\u001b[39m\u001b[39m'\u001b[39m])\n",
|
62 |
"\u001b[1;31mNameError\u001b[0m: name 'pd' is not defined"
|
63 |
]
|
64 |
}
|
|
|
70 |
" # Read the cleaned excel file\n",
|
71 |
" df = pd.read_excel(file_path)\n",
|
72 |
" \n",
|
|
|
73 |
" training_data = pd.DataFrame(columns=['id', 'annotator', 'position', 'question', 'table_file', 'answer_coordinates', 'answer_text'])\n",
|
74 |
" \n",
|
75 |
" # Define a list of possible question formulations\n",
|
frontend_app.ipynb
CHANGED
@@ -196,6 +196,22 @@
|
|
196 |
},
|
197 |
"metadata": {},
|
198 |
"output_type": "display_data"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
}
|
200 |
],
|
201 |
"source": [
|
|
|
196 |
},
|
197 |
"metadata": {},
|
198 |
"output_type": "display_data"
|
199 |
+
},
|
200 |
+
{
|
201 |
+
"name": "stdout",
|
202 |
+
"output_type": "stream",
|
203 |
+
"text": [
|
204 |
+
"Keyboard interruption in main thread... closing server.\n",
|
205 |
+
"Killing tunnel 127.0.0.1:7867 <> https://a7a23badcaa31f041e.gradio.live\n"
|
206 |
+
]
|
207 |
+
},
|
208 |
+
{
|
209 |
+
"data": {
|
210 |
+
"text/plain": []
|
211 |
+
},
|
212 |
+
"execution_count": 20,
|
213 |
+
"metadata": {},
|
214 |
+
"output_type": "execute_result"
|
215 |
}
|
216 |
],
|
217 |
"source": [
|