"Warming up PyWSD (takes ~10 secs)... took 4.7420501708984375 secs.\n",
"c:\\Users\\Legion\\.conda\\envs\\tf210\\lib\\site-packages\\transformers\\models\\t5\\tokenization_t5.py:199: FutureWarning: This tokenizer was incorrectly instantiated with a model max length of 512 which will be corrected in Transformers v5.\n",
"For now, this behavior is kept to avoid breaking backwards compatibility when padding/encoding with `truncation is True`.\n",
"- Be aware that you SHOULD NOT rely on t5-base automatically truncating your input to 512 when padding/encoding.\n",
"- If you want to encode/pad to sequences longer than 512 you can either instantiate this tokenizer with `model_max_length` or pass `max_length` when encoding/padding.\n",
"- To avoid this warning, please instantiate this tokenizer with `model_max_length` set to your preferred value.\n",
" warnings.warn(\n",
"You are using the legacy behaviour of the <class 'transformers.models.t5.tokenization_t5.T5Tokenizer'>. This means that tokens that come after special tokens will not be properly handled. We recommend you to read the related pull request available at https://github.com/huggingface/transformers/pull/24565\n"
" head_pose_response = {key: f\"{round(value, 2)} %\" for key, value in zip(head_pose_dict.keys(), head_pose_percentage)}\n",
" drowsiness_response = {key: f\"{round(value, 2)} %\" for key, value in zip(drowsiness_dict.keys(), drowsiness_percentage)}\n",
" emotion_response = {key: f\"{round(value, 2)} %\" for key, value in zip(emotion_dict.keys(), emotion_percentage)}\n",
"\n",
" return {\n",
" \"head_pose\": head_pose_response,\n",
" \"drowsiness\": drowsiness_response,\n",
" \"emotion\": emotion_response\n",
" }"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Your max_length is set to 200, but your input_length is only 110. Since this is a summarization task, where outputs shorter than the input are typically wanted, you might consider decreasing max_length manually, e.g. summarizer('...', max_length=55)\n",
"Your max_length is set to 200, but your input_length is only 130. Since this is a summarization task, where outputs shorter than the input are typically wanted, you might consider decreasing max_length manually, e.g. summarizer('...', max_length=65)\n",
"Your max_length is set to 200, but your input_length is only 173. Since this is a summarization task, where outputs shorter than the input are typically wanted, you might consider decreasing max_length manually, e.g. summarizer('...', max_length=86)\n",
"Your max_length is set to 200, but your input_length is only 81. Since this is a summarization task, where outputs shorter than the input are typically wanted, you might consider decreasing max_length manually, e.g. summarizer('...', max_length=40)\n",
"Your max_length is set to 200, but your input_length is only 128. Since this is a summarization task, where outputs shorter than the input are typically wanted, you might consider decreasing max_length manually, e.g. summarizer('...', max_length=64)\n",
"Your max_length is set to 200, but your input_length is only 137. Since this is a summarization task, where outputs shorter than the input are typically wanted, you might consider decreasing max_length manually, e.g. summarizer('...', max_length=68)\n",
"Your max_length is set to 200, but your input_length is only 99. Since this is a summarization task, where outputs shorter than the input are typically wanted, you might consider decreasing max_length manually, e.g. summarizer('...', max_length=49)\n",
"Your max_length is set to 200, but your input_length is only 139. Since this is a summarization task, where outputs shorter than the input are typically wanted, you might consider decreasing max_length manually, e.g. summarizer('...', max_length=69)\n"
]
},
{
"data": {
"text/plain": [
"\"Computer memory is represented as a sequence of bytes, grouped into words. Bytes have unique addresses or indices. The size of a word and byte determines the amount of memory that can be accessed. In C, a pointer is a variable that stores the memory address of another variable, which can also be a pointeder.\\n\\nThe value pointed to by a pointer can be retrieved using the unary * operator, for example: int *p, and int x = *p;. The memory address of a variable can be obtained using the Unary ampersand (& ) operator, such as int*p = &x; to retrieve the value points to. In C, pointers use consecutive memory addresses without being able to identify them in the code\\n\\nPointer arithmetic can be used to adjust w here a pointer pointer. For example, if pc points to the first element of an array, after executing pC+=3; then c points towards the fourth element. A pointer can even be dereferenced using array notation. For an array c, for example, the value of c[2] represents the value that the array el ement represents which is two elements beyond the array element currently pointed to\\n\\nIn the second lecture, we defined functions that took an array as an argument. For instance, void reverse(char s[] affects the values of the array. It affects both the local value and the array itself.\\n\\nC allows the creation of arrays of pointers, such as int *a[5]. These arrays are particularly useful in strings. For instance, in C's support for command line arguments, main(int argc, char *argv[]), argv is an array of character pointers representing the command line argument.\\n\\nIn C, to define an instance of a structure called circle, we write struct circle c;. Structures can also be initialized with values using the syntax 'struct circles c = 12, 23, 5;'.An automatic or local structure variable can be initialised by a function call. For instance, structure ci rcle c = circle_init(); initializes the structure variable c with values specified by the C function.A structure can be declared and int.Int y.\\n\\nIn C, programmers can use pointers to functions, enabling functions to be passed as arguments to other functions. This allows for increased flexibility and parameterization of algorithms. For instance, a sorting algorithm can be designed to accept a pointer to a comparison function.\\n\\nA structure membe r can be accessed using the notation '. notation: 'structname.member; for example: pt.x', while comparisons between structures (pt1 > Pt2) are not defined, meaning points to structures can be defined using the 'structure circle *pc' operator, but it can look cumbersome, such as (*pc).x).\\n\\n\""