{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": [],
      "gpuType": "T4"
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    },
    "accelerator": "GPU",
    "widgets": {
      "application/vnd.jupyter.widget-state+json": {
        "7f7c3deb38384bf98e1599e45e6dad49": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_17df5d090d9a4148b26818f2a1512a27",
              "IPY_MODEL_0f1af1b9b8a448c38b939e18f80fea78",
              "IPY_MODEL_6647876fbc5447f7bb6fcde8e4b64ec9"
            ],
            "layout": "IPY_MODEL_d23b86e993964853be25fa0123151cb9"
          }
        },
        "17df5d090d9a4148b26818f2a1512a27": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_5970067289174a01870a1871182a1855",
            "placeholder": "​",
            "style": "IPY_MODEL_74078600e21a44f3bec57fcc6cb070f0",
            "value": "config.json: 100%"
          }
        },
        "0f1af1b9b8a448c38b939e18f80fea78": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_fe60d3d9617e4ef1942bc03da685327c",
            "max": 384,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_034f1309489b4c9dac9cb7488a7eb12a",
            "value": 384
          }
        },
        "6647876fbc5447f7bb6fcde8e4b64ec9": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_98fde43d80fd429280c777acd5bc4cd8",
            "placeholder": "​",
            "style": "IPY_MODEL_b9a2bb0e0b2f43e38892f60b77eb59d2",
            "value": " 384/384 [00:00&lt;00:00, 46.6kB/s]"
          }
        },
        "d23b86e993964853be25fa0123151cb9": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "5970067289174a01870a1871182a1855": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "74078600e21a44f3bec57fcc6cb070f0": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "fe60d3d9617e4ef1942bc03da685327c": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "034f1309489b4c9dac9cb7488a7eb12a": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "98fde43d80fd429280c777acd5bc4cd8": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "b9a2bb0e0b2f43e38892f60b77eb59d2": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "909316e4e308489f94d401dc6be089e5": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_824cf71ae5144200a37614b194fd6d82",
              "IPY_MODEL_7eb5f5deaca8482ebd1ead2ab555a777",
              "IPY_MODEL_c38b3286c898412aba55af1d6b337e65"
            ],
            "layout": "IPY_MODEL_4be0d86b34944c169721428de8bd302a"
          }
        },
        "824cf71ae5144200a37614b194fd6d82": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_555271ce87b54cae84c6aaf550d6306b",
            "placeholder": "​",
            "style": "IPY_MODEL_6cfd6bc234d742b4aaf39ab95c421340",
            "value": "tokenizer_config.json: 100%"
          }
        },
        "7eb5f5deaca8482ebd1ead2ab555a777": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_36eb73ff02cd4d299f355d731f38b9e8",
            "max": 381,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_73b64428422d4ae29b97b3f371c529fd",
            "value": 381
          }
        },
        "c38b3286c898412aba55af1d6b337e65": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_391ce27e9d2a49b5bc6dc1095f67dfb8",
            "placeholder": "​",
            "style": "IPY_MODEL_b9476278243f4f2b9b1cbd42e4dd6b0a",
            "value": " 381/381 [00:00&lt;00:00, 45.4kB/s]"
          }
        },
        "4be0d86b34944c169721428de8bd302a": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "555271ce87b54cae84c6aaf550d6306b": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "6cfd6bc234d742b4aaf39ab95c421340": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "36eb73ff02cd4d299f355d731f38b9e8": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "73b64428422d4ae29b97b3f371c529fd": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "391ce27e9d2a49b5bc6dc1095f67dfb8": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "b9476278243f4f2b9b1cbd42e4dd6b0a": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "11f0d426f45349b68caad10df7574596": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_a9c13fdb16274cc18f7e3961008e4888",
              "IPY_MODEL_a0db392ed076408ca9af662242f65055",
              "IPY_MODEL_ef5a232ef1184921b5acaf074986c5d2"
            ],
            "layout": "IPY_MODEL_ca3fd2dfd26c427f83dbc22df1f9585c"
          }
        },
        "a9c13fdb16274cc18f7e3961008e4888": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_2ec08c40b72543568f5c5205bdb3e2ba",
            "placeholder": "​",
            "style": "IPY_MODEL_90d7eceb6e9c4be8bd22ffbb4be5e00b",
            "value": "vocab.txt: "
          }
        },
        "a0db392ed076408ca9af662242f65055": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_f477e6eb8b3e4cadb0ecf6ab2731f731",
            "max": 1,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_82bc6fbef7074056a757ef5b27c3bba9",
            "value": 1
          }
        },
        "ef5a232ef1184921b5acaf074986c5d2": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_381a9efff83947c394ce59ebc792a87d",
            "placeholder": "​",
            "style": "IPY_MODEL_0f8e166bd5f246c1b6c3058893edc1ac",
            "value": " 825k/? [00:00&lt;00:00, 40.0MB/s]"
          }
        },
        "ca3fd2dfd26c427f83dbc22df1f9585c": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "2ec08c40b72543568f5c5205bdb3e2ba": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "90d7eceb6e9c4be8bd22ffbb4be5e00b": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "f477e6eb8b3e4cadb0ecf6ab2731f731": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": "20px"
          }
        },
        "82bc6fbef7074056a757ef5b27c3bba9": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "381a9efff83947c394ce59ebc792a87d": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "0f8e166bd5f246c1b6c3058893edc1ac": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "989219a1cdd441c8aaaf2e777326d573": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_d1403363194d4c3c82672928b7005c8a",
              "IPY_MODEL_bb72583bb43e417e816adf28d9ac4a73",
              "IPY_MODEL_c4c523179726422ebff436d9e6a8903f"
            ],
            "layout": "IPY_MODEL_50b77d4e8dff42bf9b53c6d136e93f99"
          }
        },
        "d1403363194d4c3c82672928b7005c8a": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_281466ff4d7a4677902b21a4972ba6eb",
            "placeholder": "​",
            "style": "IPY_MODEL_1da382b5de5d4cc68eff6d0975ef94df",
            "value": "tokenizer.json: "
          }
        },
        "bb72583bb43e417e816adf28d9ac4a73": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_2c66c12aedac4c2bae3232a3a94ad2d3",
            "max": 1,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_cf220a9b4b544b089ab430b13624ec76",
            "value": 1
          }
        },
        "c4c523179726422ebff436d9e6a8903f": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_a0242a9199b14d869f8fd332aae818b4",
            "placeholder": "​",
            "style": "IPY_MODEL_2144ba99020742e9a042b202a7da7248",
            "value": " 2.64M/? [00:00&lt;00:00, 69.5MB/s]"
          }
        },
        "50b77d4e8dff42bf9b53c6d136e93f99": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "281466ff4d7a4677902b21a4972ba6eb": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "1da382b5de5d4cc68eff6d0975ef94df": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "2c66c12aedac4c2bae3232a3a94ad2d3": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": "20px"
          }
        },
        "cf220a9b4b544b089ab430b13624ec76": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "a0242a9199b14d869f8fd332aae818b4": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "2144ba99020742e9a042b202a7da7248": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "e4663380b8a1406ab290b4a4d637c20c": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_71e9b06cfa9d48e6a5a60c5d594cce23",
              "IPY_MODEL_95c2d7216e6f4c51a983b95f97dbb334",
              "IPY_MODEL_2fe1596177544b839d9fa41a4a84c469"
            ],
            "layout": "IPY_MODEL_27e0462dc57e49438ac38748f737bd55"
          }
        },
        "71e9b06cfa9d48e6a5a60c5d594cce23": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_f7f380e9b80d4cdd99a409651e243d7f",
            "placeholder": "​",
            "style": "IPY_MODEL_74f11fe8e76247b8b82a5157da6e8888",
            "value": "special_tokens_map.json: 100%"
          }
        },
        "95c2d7216e6f4c51a983b95f97dbb334": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_68435f04eeed42c891b528ed8a2a6e3a",
            "max": 112,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_c73582cd9ab14a34a9586703dc30547b",
            "value": 112
          }
        },
        "2fe1596177544b839d9fa41a4a84c469": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_5555a72f295a4ee1a20c34c621895ea4",
            "placeholder": "​",
            "style": "IPY_MODEL_21118d10acc146acacd16b011a7faf64",
            "value": " 112/112 [00:00&lt;00:00, 14.7kB/s]"
          }
        },
        "27e0462dc57e49438ac38748f737bd55": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "f7f380e9b80d4cdd99a409651e243d7f": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "74f11fe8e76247b8b82a5157da6e8888": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "68435f04eeed42c891b528ed8a2a6e3a": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "c73582cd9ab14a34a9586703dc30547b": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "5555a72f295a4ee1a20c34c621895ea4": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "21118d10acc146acacd16b011a7faf64": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "7574cadcf628481ebb35ff24a3dce20c": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_dd0bf850c33542878e9cf1058ea71bc7",
              "IPY_MODEL_572959525946468393c8f4067c8c43a9",
              "IPY_MODEL_6ff5d6840e334de9b536cbb6409a9188"
            ],
            "layout": "IPY_MODEL_3d67f4c7ce85468ab5b83838e3011ef7"
          }
        },
        "dd0bf850c33542878e9cf1058ea71bc7": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_14a9cd0a0d274f62a437d22b6db2f419",
            "placeholder": "​",
            "style": "IPY_MODEL_f95512c9a9814d3bb5f79ee3aa4191a6",
            "value": "model.safetensors: 100%"
          }
        },
        "572959525946468393c8f4067c8c43a9": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_73dbabfd1d674b68a0ae5e23b3b09981",
            "max": 543432324,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_93393797ced644a68a2265a0ab5d07f5",
            "value": 543432324
          }
        },
        "6ff5d6840e334de9b536cbb6409a9188": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_6138d18f461f4b17b18d15aaebc53e72",
            "placeholder": "​",
            "style": "IPY_MODEL_19d0fd6189c441838c9895c303d91058",
            "value": " 543M/543M [00:07&lt;00:00, 81.8MB/s]"
          }
        },
        "3d67f4c7ce85468ab5b83838e3011ef7": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "14a9cd0a0d274f62a437d22b6db2f419": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "f95512c9a9814d3bb5f79ee3aa4191a6": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "73dbabfd1d674b68a0ae5e23b3b09981": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "93393797ced644a68a2265a0ab5d07f5": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "6138d18f461f4b17b18d15aaebc53e72": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "19d0fd6189c441838c9895c303d91058": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "8e90f83cb1e24c1aa03fc22f2e5a4560": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_44e399dd2bd64672acbbafcc74d2af14",
              "IPY_MODEL_a4487eb01a4b470b91e005ff1bcbd301",
              "IPY_MODEL_7ff4dd8e19004694a6212670411c0993"
            ],
            "layout": "IPY_MODEL_72190d19f96a4ed7a4754804294fbc9c"
          }
        },
        "44e399dd2bd64672acbbafcc74d2af14": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_af126faf38d3498f9e12e250c9fd7924",
            "placeholder": "​",
            "style": "IPY_MODEL_fc1c2905d53b4426bc7eee51457df417",
            "value": "Loading weights: 100%"
          }
        },
        "a4487eb01a4b470b91e005ff1bcbd301": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_894f95a4c46941cda501d3bbafd66024",
            "max": 199,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_55ce665363104a18a6e654c4185a8777",
            "value": 199
          }
        },
        "7ff4dd8e19004694a6212670411c0993": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_36f8e9fbf6a942f8806fd14eca210105",
            "placeholder": "​",
            "style": "IPY_MODEL_8dd75fed00574a838fef06403beaafb4",
            "value": " 199/199 [00:00&lt;00:00, 609.68it/s, Materializing param=pooler.dense.weight]"
          }
        },
        "72190d19f96a4ed7a4754804294fbc9c": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "af126faf38d3498f9e12e250c9fd7924": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "fc1c2905d53b4426bc7eee51457df417": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "894f95a4c46941cda501d3bbafd66024": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "55ce665363104a18a6e654c4185a8777": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "36f8e9fbf6a942f8806fd14eca210105": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "8dd75fed00574a838fef06403beaafb4": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        }
      }
    }
  },
  "cells": [
    {
      "cell_type": "code",
      "source": [
        "import numpy as np\n",
        "import matplotlib.pyplot as plt\n",
        "\n",
        "from sklearn.model_selection import train_test_split\n",
        "from sklearn.feature_extraction.text import TfidfVectorizer\n",
        "\n",
        "from sklearn.linear_model import LogisticRegression\n",
        "from sklearn.naive_bayes import MultinomialNB\n",
        "from sklearn.svm import LinearSVC\n",
        "\n",
        "from sklearn.metrics import accuracy_score, classification_report, confusion_matrix"
      ],
      "metadata": {
        "id": "HuscT6DbUheg"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "**Step 2: Dataset Description and Sources**\n",
        "\n",
        "This study utilizes an Arabic dataset consisting of both real and fake news articles for the purpose of training and evaluating machine learning models for fake news detection.\n",
        "\n",
        "\n",
        "**Real News Sources** (1,925 real news articles)\n",
        "The real news articles were collected from official Saudi media platforms to ensure authenticity and credibility. The primary sources include:\n",
        "\n",
        "*Saudi Broadcasting Authority (SBA)\n",
        "\n",
        "*Saudia official website\n",
        "\n",
        "*SBC official website\n",
        "\n",
        "These platforms are officially recognized and operate under regulated media frameworks, ensuring that the collected news content represents verified and reliable information.\n",
        "\n",
        "**Fake News Source**(1,000 fake news articles)\n",
        "\n",
        "The fake news samples were obtained from a publicly available dataset published on Kaggle,\n",
        "\n",
        "The selected dataset contains pre-labeled fake news articles that have been used in misinformation detection studies, ensuring transparency and reproducibility in experimental evaluation.\n",
        "\n",
        "**Final Dataset Composition**\n",
        "\n",
        "After merging and performing data cleaning (removing null values, filtering empty texts, and standardizing labels), the final dataset Total: 2,198 news samples\n"
      ],
      "metadata": {
        "id": "LYsd3Ei6ZA3k"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from google.colab import files\n",
        "uploaded = files.upload()"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 73
        },
        "id": "7pu2YElPZ7RX",
        "outputId": "2cf7c10b-41e0-440a-c78b-17a8ef8b4ba4"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<IPython.core.display.HTML object>"
            ],
            "text/html": [
              "\n",
              "     <input type=\"file\" id=\"files-5acecc43-2011-40f3-ab24-71d4bb81c0e0\" name=\"files[]\" multiple disabled\n",
              "        style=\"border:none\" />\n",
              "     <output id=\"result-5acecc43-2011-40f3-ab24-71d4bb81c0e0\">\n",
              "      Upload widget is only available when the cell has been executed in the\n",
              "      current browser session. Please rerun this cell to enable.\n",
              "      </output>\n",
              "      <script>// Copyright 2017 Google LLC\n",
              "//\n",
              "// Licensed under the Apache License, Version 2.0 (the \"License\");\n",
              "// you may not use this file except in compliance with the License.\n",
              "// You may obtain a copy of the License at\n",
              "//\n",
              "//      http://www.apache.org/licenses/LICENSE-2.0\n",
              "//\n",
              "// Unless required by applicable law or agreed to in writing, software\n",
              "// distributed under the License is distributed on an \"AS IS\" BASIS,\n",
              "// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
              "// See the License for the specific language governing permissions and\n",
              "// limitations under the License.\n",
              "\n",
              "/**\n",
              " * @fileoverview Helpers for google.colab Python module.\n",
              " */\n",
              "(function(scope) {\n",
              "function span(text, styleAttributes = {}) {\n",
              "  const element = document.createElement('span');\n",
              "  element.textContent = text;\n",
              "  for (const key of Object.keys(styleAttributes)) {\n",
              "    element.style[key] = styleAttributes[key];\n",
              "  }\n",
              "  return element;\n",
              "}\n",
              "\n",
              "// Max number of bytes which will be uploaded at a time.\n",
              "const MAX_PAYLOAD_SIZE = 100 * 1024;\n",
              "\n",
              "function _uploadFiles(inputId, outputId) {\n",
              "  const steps = uploadFilesStep(inputId, outputId);\n",
              "  const outputElement = document.getElementById(outputId);\n",
              "  // Cache steps on the outputElement to make it available for the next call\n",
              "  // to uploadFilesContinue from Python.\n",
              "  outputElement.steps = steps;\n",
              "\n",
              "  return _uploadFilesContinue(outputId);\n",
              "}\n",
              "\n",
              "// This is roughly an async generator (not supported in the browser yet),\n",
              "// where there are multiple asynchronous steps and the Python side is going\n",
              "// to poll for completion of each step.\n",
              "// This uses a Promise to block the python side on completion of each step,\n",
              "// then passes the result of the previous step as the input to the next step.\n",
              "function _uploadFilesContinue(outputId) {\n",
              "  const outputElement = document.getElementById(outputId);\n",
              "  const steps = outputElement.steps;\n",
              "\n",
              "  const next = steps.next(outputElement.lastPromiseValue);\n",
              "  return Promise.resolve(next.value.promise).then((value) => {\n",
              "    // Cache the last promise value to make it available to the next\n",
              "    // step of the generator.\n",
              "    outputElement.lastPromiseValue = value;\n",
              "    return next.value.response;\n",
              "  });\n",
              "}\n",
              "\n",
              "/**\n",
              " * Generator function which is called between each async step of the upload\n",
              " * process.\n",
              " * @param {string} inputId Element ID of the input file picker element.\n",
              " * @param {string} outputId Element ID of the output display.\n",
              " * @return {!Iterable<!Object>} Iterable of next steps.\n",
              " */\n",
              "function* uploadFilesStep(inputId, outputId) {\n",
              "  const inputElement = document.getElementById(inputId);\n",
              "  inputElement.disabled = false;\n",
              "\n",
              "  const outputElement = document.getElementById(outputId);\n",
              "  outputElement.innerHTML = '';\n",
              "\n",
              "  const pickedPromise = new Promise((resolve) => {\n",
              "    inputElement.addEventListener('change', (e) => {\n",
              "      resolve(e.target.files);\n",
              "    });\n",
              "  });\n",
              "\n",
              "  const cancel = document.createElement('button');\n",
              "  inputElement.parentElement.appendChild(cancel);\n",
              "  cancel.textContent = 'Cancel upload';\n",
              "  const cancelPromise = new Promise((resolve) => {\n",
              "    cancel.onclick = () => {\n",
              "      resolve(null);\n",
              "    };\n",
              "  });\n",
              "\n",
              "  // Wait for the user to pick the files.\n",
              "  const files = yield {\n",
              "    promise: Promise.race([pickedPromise, cancelPromise]),\n",
              "    response: {\n",
              "      action: 'starting',\n",
              "    }\n",
              "  };\n",
              "\n",
              "  cancel.remove();\n",
              "\n",
              "  // Disable the input element since further picks are not allowed.\n",
              "  inputElement.disabled = true;\n",
              "\n",
              "  if (!files) {\n",
              "    return {\n",
              "      response: {\n",
              "        action: 'complete',\n",
              "      }\n",
              "    };\n",
              "  }\n",
              "\n",
              "  for (const file of files) {\n",
              "    const li = document.createElement('li');\n",
              "    li.append(span(file.name, {fontWeight: 'bold'}));\n",
              "    li.append(span(\n",
              "        `(${file.type || 'n/a'}) - ${file.size} bytes, ` +\n",
              "        `last modified: ${\n",
              "            file.lastModifiedDate ? file.lastModifiedDate.toLocaleDateString() :\n",
              "                                    'n/a'} - `));\n",
              "    const percent = span('0% done');\n",
              "    li.appendChild(percent);\n",
              "\n",
              "    outputElement.appendChild(li);\n",
              "\n",
              "    const fileDataPromise = new Promise((resolve) => {\n",
              "      const reader = new FileReader();\n",
              "      reader.onload = (e) => {\n",
              "        resolve(e.target.result);\n",
              "      };\n",
              "      reader.readAsArrayBuffer(file);\n",
              "    });\n",
              "    // Wait for the data to be ready.\n",
              "    let fileData = yield {\n",
              "      promise: fileDataPromise,\n",
              "      response: {\n",
              "        action: 'continue',\n",
              "      }\n",
              "    };\n",
              "\n",
              "    // Use a chunked sending to avoid message size limits. See b/62115660.\n",
              "    let position = 0;\n",
              "    do {\n",
              "      const length = Math.min(fileData.byteLength - position, MAX_PAYLOAD_SIZE);\n",
              "      const chunk = new Uint8Array(fileData, position, length);\n",
              "      position += length;\n",
              "\n",
              "      const base64 = btoa(String.fromCharCode.apply(null, chunk));\n",
              "      yield {\n",
              "        response: {\n",
              "          action: 'append',\n",
              "          file: file.name,\n",
              "          data: base64,\n",
              "        },\n",
              "      };\n",
              "\n",
              "      let percentDone = fileData.byteLength === 0 ?\n",
              "          100 :\n",
              "          Math.round((position / fileData.byteLength) * 100);\n",
              "      percent.textContent = `${percentDone}% done`;\n",
              "\n",
              "    } while (position < fileData.byteLength);\n",
              "  }\n",
              "\n",
              "  // All done.\n",
              "  yield {\n",
              "    response: {\n",
              "      action: 'complete',\n",
              "    }\n",
              "  };\n",
              "}\n",
              "\n",
              "scope.google = scope.google || {};\n",
              "scope.google.colab = scope.google.colab || {};\n",
              "scope.google.colab._files = {\n",
              "  _uploadFiles,\n",
              "  _uploadFilesContinue,\n",
              "};\n",
              "})(self);\n",
              "</script> "
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Saving 2925 real and fake news dataset.csv to 2925 real and fake news dataset (1).csv\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "**Step 3: Reading the Dataset**\n",
        "\n",
        "\n",
        "After uploading the dataset, it is loaded into a pandas DataFrame for further processing.\n",
        "\n",
        "The dataset is displayed to understand the size of the data before cleaning.\n",
        "\n",
        "Additionally, the first five rows are printed to inspect the structure of the dataset, including column names and sample content.\n"
      ],
      "metadata": {
        "id": "8IVAaCULbjru"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "import pandas as pd\n",
        "FILE_NAME = list(uploaded.keys())[0]\n",
        "df = pd.read_csv(FILE_NAME, encoding=\"utf-8-sig\")\n",
        "\n",
        "print(\"Uploaded file:\", FILE_NAME)\n",
        "print(\"Dataset Shape (Before Cleaning):\", df.shape)\n",
        "\n",
        "df.head()"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 211
        },
        "id": "2rk0nYBrcy8h",
        "outputId": "74f95daa-52b5-42df-8ad7-6e8a54fff644"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "error",
          "ename": "NameError",
          "evalue": "name 'uploaded' is not defined",
          "traceback": [
            "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
            "\u001b[0;31mNameError\u001b[0m                                 Traceback (most recent call last)",
            "\u001b[0;32m/tmp/ipython-input-741822501.py\u001b[0m in \u001b[0;36m<cell line: 0>\u001b[0;34m()\u001b[0m\n\u001b[1;32m      1\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mpandas\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mFILE_NAME\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlist\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0muploaded\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeys\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      3\u001b[0m \u001b[0mdf\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread_csv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mFILE_NAME\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mencoding\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"utf-8-sig\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      4\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      5\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Uploaded file:\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mFILE_NAME\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;31mNameError\u001b[0m: name 'uploaded' is not defined"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "**Step 4: Verify Dataset Structure and Columns**\n",
        "\n",
        "\n",
        "This step confirms that the dataset was loaded correctly by checking:\n",
        "\n",
        "\n",
        "*   The dataset shape (rows and columns)\n",
        "*   Column names\n",
        "*   Quick summary of missing values\n",
        "\n",
        "The expected output is the number of rows/columns and a list of column names.\n",
        "\n"
      ],
      "metadata": {
        "id": "WZ0wqGsMk2zz"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "print(\"Dataset Shape:\", df.shape)\n",
        "print(\"\\nColumns:\", df.columns.tolist())\n",
        "\n",
        "print(\"\\nMissing values per column:\")\n",
        "print(df.isnull().sum())"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "-2gDwfddl09l",
        "outputId": "41847097-4def-4dfb-d994-1bbce2bb6959"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Dataset Shape: (2198, 6)\n",
            "\n",
            "Columns: ['id', 'title', 'content', 'source', 'date', 'label']\n",
            "\n",
            "Missing values per column:\n",
            "id            0\n",
            "title         0\n",
            "content       2\n",
            "source        0\n",
            "date       1000\n",
            "label         0\n",
            "dtype: int64\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "# Keep only relevant columns\n",
        "df = df[[\"content\", \"label\"]]\n",
        "\n",
        "print(\"Dataset Shape after dropping unnecessary columns:\", df.shape)\n",
        "df.head()"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 224
        },
        "id": "Kms1U_zxo4Gj",
        "outputId": "b22079b6-cd53-4bf1-e898-6faeedc202a8"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Dataset Shape after dropping unnecessary columns: (2198, 2)\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                                             content label\n",
              "0  كشفت قناة السعودية عن باقة مميزة لبرامج ومسلسل...  real\n",
              "1    كشفت قناة SBC  عن باقة مميزة لبرامج ومسلسلات...  real\n",
              "2  تبث قناة \"السعودية\" لقاءً خاصاً مع سمو ولي الع...  real\n",
              "3    أكد صاحب السمو الملكي الأمير محمد بن سلمان ب...  real\n",
              "4    قال د. أحمد الحارثي وكيل عمادة التعلم الإلكت...  real"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-29e85976-0919-4509-883a-0883f3d59de7\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>content</th>\n",
              "      <th>label</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>كشفت قناة السعودية عن باقة مميزة لبرامج ومسلسل...</td>\n",
              "      <td>real</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>كشفت قناة SBC  عن باقة مميزة لبرامج ومسلسلات...</td>\n",
              "      <td>real</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>تبث قناة \"السعودية\" لقاءً خاصاً مع سمو ولي الع...</td>\n",
              "      <td>real</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>أكد صاحب السمو الملكي الأمير محمد بن سلمان ب...</td>\n",
              "      <td>real</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>قال د. أحمد الحارثي وكيل عمادة التعلم الإلكت...</td>\n",
              "      <td>real</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-29e85976-0919-4509-883a-0883f3d59de7')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-29e85976-0919-4509-883a-0883f3d59de7 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-29e85976-0919-4509-883a-0883f3d59de7');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "df",
              "summary": "{\n  \"name\": \"df\",\n  \"rows\": 2198,\n  \"fields\": [\n    {\n      \"column\": \"content\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 2135,\n        \"samples\": [\n          \"\\u0645\\u0627\\u0643\\u0631\\u0648\\u0646 \\u064a\\u0631\\u063a\\u0628 \\u0641\\u064a \\u0645\\u062d\\u0627\\u0633\\u0628\\u0629 \\u0646\\u0627\\u0634\\u0631\\u064a \\u0627\\u0644\\u0623\\u062e\\u0628\\u0627\\u0631 \\u0627\\u0644\\u0645\\u0636\\u0644\\u0644\\u0629 \\u0648\\u062a\\u0642\\u062f\\u064a\\u0645\\u0647\\u0645 \\u0625\\u0644\\u0649 \\u0627\\u0644\\u0639\\u062f\\u0627\\u0644\\u0629\",\n          \"\\u0642\\u0627\\u0644 \\u0645\\u062f\\u064a\\u0631 \\u0627\\u0644\\u062a\\u0633\\u0648\\u064a\\u0642 \\u0648\\u0627\\u0644\\u0625\\u0628\\u062f\\u0627\\u0639 \\u0628\\u0631\\u0627\\u0621 \\u062e\\u0634\\u0641\\u0627\\u062a\\u064a \\u0625\\u0646 \\u0645\\u0641\\u0647\\u0648\\u0645 \\u0627\\u0644\\u062a\\u0633\\u0648\\u064a\\u0642 \\u0647\\u0648 \\u0627\\u0644\\u0642\\u062f\\u0631\\u0629 \\u0639\\u0644\\u0649 \\u0625\\u0646\\u0634\\u0627\\u0621 \\u062d\\u0627\\u062c\\u0629 \\u0644\\u062f\\u0649 \\u0627\\u0644\\u0639\\u0645\\u0644\\u0627\\u0621 \\u0644\\u0627\\u0633\\u062a\\u062e\\u062f\\u0627\\u0645 \\u062e\\u062f\\u0645\\u0629 \\u0623\\u0648 \\u0645\\u0646\\u062a\\u062c \\u0645\\u062d\\u062f\\u062f\\u060c \\u0644\\u064a\\u0635\\u0628\\u062d \\u0644\\u0627\\u062d\\u0642\\u0627\\u064f \\u0625\\u062d\\u062f\\u0649 \\u0627\\u0644\\u062e\\u064a\\u0627\\u0631\\u0627\\u062a \\u0627\\u0644\\u0623\\u0648\\u0644\\u0649 \\u0627\\u0644\\u062a\\u064a \\u062a\\u0628\\u0627\\u062f\\u0631 \\u0625\\u0644\\u0649 \\u0630\\u0647\\u0646 \\u0627\\u0644\\u0639\\u0645\\u0644\\u0627\\u0621.    \\u0648\\u0623\\u0636\\u0627\\u0641 \\u062e\\u0644\\u0627\\u0644 \\u0627\\u0633\\u062a\\u0636\\u0627\\u0641\\u062a\\u0647 \\u0641\\u064a \\u0628\\u0631\\u0646\\u0627\\u0645\\u062c \\\"\\u0627\\u0633\\u062a\\u0648\\u062f\\u064a\\u0648SBC\\\" \\u0639\\u0644\\u0649 \\u0634\\u0627\\u0634\\u0629SBC\\u060c \\u0623\\u0646 \\u0627\\u0644\\u062a\\u0633\\u0648\\u064a\\u0642 \\u064a\\u0646\\u0642\\u0633\\u0645 \\u0625\\u0644\\u0649 \\u0625\\u0644\\u0643\\u062a\\u0631\\u0648\\u0646\\u064a \\u0648\\u062a\\u0642\\u0644\\u064a\\u062f\\u064a\\u060c \\u0645\\u0624\\u0643\\u062f\\u0627\\u064b \\u0623\\u0646 \\u0628\\u0639\\u0636 \\u0627\\u0644\\u0623\\u0634\\u062e\\u0627\\u0635 \\u0644\\u0627 \\u0632\\u0627\\u0644\\u062a \\u062a\\u0647\\u062a\\u0645 \\u0628\\u0637\\u0631\\u0642 \\u0627\\u0644\\u062a\\u0633\\u0648\\u064a\\u0642 \\u0627\\u0644\\u062a\\u0642\\u0644\\u064a\\u062f\\u064a\\u0629 \\u0645\\u062b\\u0644: \\u0627\\u0644\\u0644\\u0648\\u062d\\u0627\\u062a \\u0627\\u0644\\u0625\\u0639\\u0644\\u0627\\u0646\\u064a\\u0629.    \\u0648\\u0623\\u0643\\u062f \\u0623\\u0646 \\u0625\\u062d\\u062f\\u0649 \\u0637\\u0631\\u0642 \\u0627\\u0644\\u062a\\u0633\\u0648\\u064a\\u0642 \\u0627\\u0644\\u0646\\u0627\\u062c\\u062d\\u0629 \\u0647\\u0648 \\u062f\\u0631\\u0627\\u0633\\u0629 \\u0627\\u0644\\u062c\\u0645\\u0647\\u0648\\u0631 \\u0627\\u0644\\u0645\\u0633\\u062a\\u0647\\u062f\\u0641\\u060c \\u0648\\u062a\\u062d\\u062f\\u064a\\u062f \\u0641\\u0626\\u062a\\u0647 \\u0627\\u0644\\u0639\\u0645\\u0631\\u064a\\u0629\\u060c \\u0648\\u0645\\u0639\\u0631\\u0641\\u0629 \\u0627\\u0644\\u062a\\u0637\\u0628\\u064a\\u0642\\u0627\\u062a \\u0627\\u0644\\u0625\\u0644\\u0643\\u062a\\u0631\\u0648\\u0646\\u064a\\u0629 \\u0627\\u0644\\u062a\\u064a \\u064a\\u0641\\u0636\\u0644\\u0647\\u0627. \\u0643\\u0645\\u0627 \\u0643\\u0634\\u0641 \\u0623\\u0646\\u0647 \\u064a\\u0645\\u0643\\u0646 \\u0627\\u0644\\u0627\\u0639\\u062a\\u0645\\u0627\\u062f \\u0639\\u0644\\u0649 \\u062a\\u0637\\u0628\\u064a\\u0642 \\u0625\\u0644\\u0643\\u062a\\u0631\\u0648\\u0646\\u064a \\u0648\\u0627\\u062d\\u062f \\u0641\\u0642\\u0637 \\u0645\\u0646 \\u0623\\u062c\\u0644 \\u0627\\u0644\\u062a\\u0633\\u0648\\u064a\\u0642 \\u0628\\u0637\\u0631\\u064a\\u0642\\u0629 \\u0635\\u062d\\u064a\\u062d\\u0629.    \\u0648\\u0639\\u0646 \\u0627\\u0644\\u062a\\u0633\\u0648\\u064a\\u0642 \\u0627\\u0644\\u0634\\u062e\\u0635\\u064a\\u060c \\u0642\\u0627\\u0644 \\u062e\\u0634\\u0641\\u0627\\u062a\\u064a \\u0625\\u0646\\u0647 \\u0627\\u0644\\u0642\\u062f\\u0631\\u0629 \\u0639\\u0644\\u0649 \\u062a\\u0648\\u0638\\u064a\\u0641 \\u0645\\u0647\\u0627\\u0631\\u0627\\u062a \\u0627\\u0644\\u0634\\u062e\\u0635 \\u0623\\u0648 \\u0627\\u0644\\u062e\\u062f\\u0645\\u0627\\u062a \\u0627\\u0644\\u062a\\u064a \\u064a\\u0631\\u064a\\u062f \\u0623\\u0646 \\u064a\\u0642\\u062f\\u0651\\u0645\\u0647\\u0627 \\u0644\\u0644\\u062c\\u0645\\u0647\\u0648\\u0631 \\u0628\\u0637\\u0631\\u064a\\u0642\\u0629 \\u0645\\u0639\\u064a\\u0646\\u0629\\u060c \\u0644\\u064a\\u0635\\u0628\\u062d \\u0627\\u0644\\u0634\\u062e\\u0635 \\u0630\\u0627\\u062a\\u0647 \\u0647\\u0648 \\u0627\\u0644\\u0645\\u0627\\u0631\\u0643\\u0629 \\u0627\\u0644\\u0625\\u0639\\u0644\\u0627\\u0646\\u064a\\u0629.\",\n          \"\\u064a\\u062a\\u0645 \\u062a\\u062f\\u0627\\u0648\\u0644 \\u0641\\u064a\\u062f\\u064a\\u0648 \\u0639\\u0628\\u0631 \\u0645\\u0648\\u0627\\u0642\\u0639 \\u0627\\u0644\\u062a\\u0648\\u0627\\u0635\\u0644 \\u0627\\u0644\\u0625\\u062c\\u062a\\u0645\\u0627\\u0639\\u064a \\u0645\\u0631\\u0641\\u0642\\u0629 \\u0628\\u0627\\u0644\\u0646\\u0635 \\u0627\\u0644\\u0622\\u062a\\u064a: \\\"\\u0627\\u0644\\u0634\\u064a\\u062e \\u0642\\u0637\\u0631\\u064a \\u0627\\u0644\\u0633\\u0645\\u0631\\u0645\\u062f \\u0645\\u0646 \\u0627\\u0647\\u0644 \\u0627\\u0644\\u0627\\u0646\\u0628\\u0627\\u0631 \\u064a\\u0644\\u062a\\u0642\\u064a \\u0628\\u0639\\u062f\\u062f \\u0645\\u0646 \\u0627\\u0644\\u0645\\u062a\\u0638\\u0627\\u0647\\u0631\\u064a\\u0646 \\u0645\\u0646 \\u0645\\u062d\\u0627\\u0641\\u0638\\u0627\\u062a \\u0627\\u0644\\u0648\\u0633\\u0637 \\u0648\\u0627\\u0644\\u062c\\u0646\\u0648\\u0628 \\u062d\\u064a\\u062b \\u064a\\u062a\\u0645 \\u062f\\u0641\\u0639 \\u0623\\u062c\\u0648\\u0631 \\u0627\\u0644\\u0646\\u0627\\u0634\\u0637\\u064a\\u0646 \\u0647\\u064f\\u0646\\u0627 \\u0648\\u0628\\u0623\\u0645\\u0648\\u0627\\u0644 \\u0637\\u0627\\u0626\\u0644\\u0629 \\u062c\\u062f\\u0622 \\u060c\\u0643\\u0645\\u0627 \\u0648\\u064a\\u0638\\u0647\\u0631 \\u0641\\u064a \\u0627\\u0644\\u0645\\u0642\\u0637\\u0639 \\u0627\\u0646 \\u0642\\u0644\\u0628 \\u0627\\u0644\\u0634\\u064a\\u062e \\u062d\\u0632\\u064a\\u0646 \\u062c\\u062f\\u0622 \\u0639\\u0644\\u0649 \\u0627\\u0644\\u0645\\u062d\\u0627\\u0641\\u0638\\u0627\\u062a \\u0627\\u0644\\u062c\\u0646\\u0648\\u0628\\u064a\\u0629\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"label\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 2,\n        \"samples\": [\n          \"fake\",\n          \"real\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {},
          "execution_count": 18
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "**Step 6: Remove Missing , Empty Text Rows Remove duplicates**\n",
        "\n",
        "\n",
        "In this step, i remove rows that contain missing or empty text values in the content column.\n",
        "\n",
        "Machine learning models require meaningful textual input.\n",
        "\n",
        "Rows with null or empty content do not provide useful information and may cause errors during feature extraction.\n",
        ":"
      ],
      "metadata": {
        "id": "TSCSZ50ppcpK"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Keep only needed columns\n",
        "df = df[[\"content\", \"label\"]]\n",
        "\n",
        "# Remove missing values\n",
        "df = df.dropna(subset=[\"content\"])\n",
        "df = df[df[\"content\"].str.strip().ne(\"\")]\n",
        "\n",
        "# Standardize labels\n",
        "df[\"label\"] = df[\"label\"].astype(str).str.strip().str.lower()\n",
        "\n",
        "# Remove duplicates\n",
        "print(\"Rows before removing duplicates:\", df.shape[0])\n",
        "df = df.drop_duplicates(subset=[\"content\"])\n",
        "print(\"Rows after removing duplicates:\", df.shape[0])\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "aWALUovcqRb7",
        "outputId": "a3d757da-31c5-4dc9-dd93-f9e3082e1e8a"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Rows before removing duplicates: 2135\n",
            "Rows after removing duplicates: 2135\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "**Step 8: Define Features (X) and Target (y)**\n",
        "\n",
        "In supervised learning, the dataset must be divided into:\n",
        "\n",
        "1. X (Features): the input text (news content)\n",
        "\n",
        "2. y (Target): the corresponding label (real or fake)\n",
        "\n",
        "This step prepares the dataset for splitting into training and testing sets."
      ],
      "metadata": {
        "id": "yJkhhTaMrSen"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "X = df[\"content\"]\n",
        "y = df[\"label\"]\n",
        "\n",
        "print(\"Sample text preview:\\n\")\n",
        "print(X.iloc[0][:300])"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "piL_sH94r4dO",
        "outputId": "27aa291b-92b5-4f52-9396-2be54b4e33a2"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Sample text preview:\n",
            "\n",
            "كشفت قناة السعودية عن باقة مميزة لبرامج ومسلسلات موسم رمضان 2021، والتي تضم مجموعة من أكبر نجوم المملكة والعالم العربي.  وتشهد المسلسلات تنوعاً ضخماً بين الكوميدي والدراما، كما تُشبع البرامج جميع اهتمامات المشاهد، فمنها الديني والوثائقي والحواري والكوميدي، وكذلك برامج المسابقات والطبخ.        8 برام\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "**Step 9: Train/Test Split**\n",
        "\n",
        "In this step, the dataset is divided into training and testing sets.\n",
        "\n",
        "1. The training set (80%) is used to train the model.\n",
        "2. The testing set (20%) is used to evaluate model performance on unseen data.\n",
        "\n",
        "I use stratify=y to preserve the same class distribution (real vs fake) in both training and testing sets.\n",
        "\n",
        "This ensures fair and reliable evaluation"
      ],
      "metadata": {
        "id": "_rby94_4sErm"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "X_train, X_test, y_train, y_test = train_test_split(\n",
        "    X,\n",
        "    y,\n",
        "    test_size=0.2,\n",
        "    random_state=42,\n",
        "    stratify=y\n",
        ")\n",
        "\n",
        "print(\"Training size:\", len(X_train))\n",
        "print(\"Testing size:\", len(X_test))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "HYszZli9sq9q",
        "outputId": "e1a7dc41-ca4a-47ad-986d-30b24ab8300c"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Training size: 1708\n",
            "Testing size: 427\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "**Step 10 : TF-IDF Feature Extraction**\n",
        "\n",
        "In this step, i  convert textual data into numerical features using TF-IDF (Term Frequency–Inverse Document Frequency).\n",
        "\n",
        "TF-IDF assigns higher weights to important words that appear frequently in a document but less frequently across the entire dataset.\n",
        "I use:\n",
        "\n",
        "1. max_features=5000 to limit feature size\n",
        "2. ngram_range=(1,2) to include both single words (unigrams) and word pairs (bigrams)"
      ],
      "metadata": {
        "id": "VfaMbU_ztMMp"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.feature_extraction.text import TfidfVectorizer\n",
        "\n",
        "vectorizer = TfidfVectorizer(\n",
        "    max_features=5000,\n",
        "    ngram_range=(1, 2)\n",
        ")\n",
        "\n",
        "X_train_tfidf = vectorizer.fit_transform(X_train)\n",
        "X_test_tfidf = vectorizer.transform(X_test)\n",
        "\n",
        "print(\"TF-IDF Training Shape:\", X_train_tfidf.shape)\n",
        "print(\"TF-IDF Testing Shape:\", X_test_tfidf.shape)\n",
        "print(\"Number of Features:\", len(vectorizer.get_feature_names_out()))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "LVCsLIA7tmg4",
        "outputId": "602230f4-9bc4-428a-d243-92f270c376e7"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "TF-IDF Training Shape: (1708, 5000)\n",
            "TF-IDF Testing Shape: (427, 5000)\n",
            "Number of Features: 5000\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "**Model 1 : Logistic Regression**\n",
        "\n",
        "In this step, we train a Logistic Regression classifier on TF-IDF features.\n",
        "Logistic Regression is a strong baseline for text classification because it performs well with high-dimensional sparse inputs such as TF-IDF vectors.\n",
        "We evaluate the model on the test set using accuracy, classification report, and confusion matrix.\n"
      ],
      "metadata": {
        "id": "7KUZfatW6GcG"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.linear_model import LogisticRegression\n",
        "from sklearn.metrics import accuracy_score, classification_report, confusion_matrix\n",
        "\n",
        "lr_model = LogisticRegression(max_iter=2000)\n",
        "lr_model.fit(X_train_tfidf, y_train)\n",
        "\n",
        "y_pred_lr = lr_model.predict(X_test_tfidf)\n",
        "lr_accuracy = accuracy_score(y_test, y_pred_lr)\n",
        "\n",
        "print(\"TF-IDF + Logistic Regression Accuracy:\", round(lr_accuracy, 4))\n",
        "print(\"\\nClassification Report:\\n\", classification_report(y_test, y_pred_lr))\n",
        "print(\"\\nConfusion Matrix:\\n\", confusion_matrix(y_test, y_pred_lr))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "XRMk9_ULISeb",
        "outputId": "49f57308-6567-47ed-b5e2-978bb4fee5f2"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "TF-IDF + Logistic Regression Accuracy: 0.9813\n",
            "\n",
            "Classification Report:\n",
            "               precision    recall  f1-score   support\n",
            "\n",
            "        fake       0.98      0.98      0.98       195\n",
            "        real       0.98      0.98      0.98       232\n",
            "\n",
            "    accuracy                           0.98       427\n",
            "   macro avg       0.98      0.98      0.98       427\n",
            "weighted avg       0.98      0.98      0.98       427\n",
            "\n",
            "\n",
            "Confusion Matrix:\n",
            " [[191   4]\n",
            " [  4 228]]\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "**Model 2 — TF-IDF + Multinomial Naive Bayes**\n",
        "\n",
        "In this step, we train Multinomial Naive Bayes using TF-IDF features.\n",
        "Naive Bayes is widely used in text classification because it is fast and often effective with frequency-based representations.\n",
        "We evaluate the model using the same metrics to compare it fairly with Logistic Regression and SVM."
      ],
      "metadata": {
        "id": "i8M1akPjIZlx"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.naive_bayes import MultinomialNB\n",
        "from sklearn.metrics import accuracy_score, classification_report, confusion_matrix\n",
        "\n",
        "nb_model = MultinomialNB()\n",
        "nb_model.fit(X_train_tfidf, y_train)\n",
        "\n",
        "y_pred_nb = nb_model.predict(X_test_tfidf)\n",
        "nb_accuracy = accuracy_score(y_test, y_pred_nb)\n",
        "\n",
        "print(\"TF-IDF + Naive Bayes Accuracy:\", round(nb_accuracy, 4))\n",
        "print(\"\\nClassification Report:\\n\", classification_report(y_test, y_pred_nb))\n",
        "print(\"\\nConfusion Matrix:\\n\", confusion_matrix(y_test, y_pred_nb))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "KEDbootcIgj2",
        "outputId": "80aa0a83-35cc-4b5b-88da-bfcff987f3a3"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "TF-IDF + Naive Bayes Accuracy: 0.9485\n",
            "\n",
            "Classification Report:\n",
            "               precision    recall  f1-score   support\n",
            "\n",
            "        fake       0.99      0.90      0.94       195\n",
            "        real       0.92      0.99      0.95       232\n",
            "\n",
            "    accuracy                           0.95       427\n",
            "   macro avg       0.95      0.94      0.95       427\n",
            "weighted avg       0.95      0.95      0.95       427\n",
            "\n",
            "\n",
            "Confusion Matrix:\n",
            " [[175  20]\n",
            " [  2 230]]\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "**Model 3 — TF-IDF + SVM (LinearSVC)**\n",
        "\n",
        "In this step, we train a Support Vector Machine (LinearSVC) classifier on TF-IDF features.\n",
        "SVMs are strong for text classification because they handle large sparse feature spaces effectively and learn a robust decision boundary between classes.\n",
        "LinearSVC is efficient for TF-IDF and is commonly used as a top classical baseline."
      ],
      "metadata": {
        "id": "2kRR4gaYI4Iv"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.svm import LinearSVC\n",
        "from sklearn.metrics import accuracy_score, classification_report, confusion_matrix\n",
        "\n",
        "svm_model = LinearSVC()\n",
        "svm_model.fit(X_train_tfidf, y_train)\n",
        "\n",
        "y_pred_svm = svm_model.predict(X_test_tfidf)\n",
        "svm_accuracy = accuracy_score(y_test, y_pred_svm)\n",
        "\n",
        "print(\"TF-IDF + SVM Accuracy:\", round(svm_accuracy, 4))\n",
        "print(\"\\nClassification Report:\\n\", classification_report(y_test, y_pred_svm))\n",
        "print(\"\\nConfusion Matrix:\\n\", confusion_matrix(y_test, y_pred_svm))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "q7eqhuEAJD-A",
        "outputId": "d7f97d31-075e-45a5-d8e2-1550591ab3f5"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "TF-IDF + SVM Accuracy: 0.9813\n",
            "\n",
            "Classification Report:\n",
            "               precision    recall  f1-score   support\n",
            "\n",
            "        fake       0.98      0.98      0.98       195\n",
            "        real       0.98      0.98      0.98       232\n",
            "\n",
            "    accuracy                           0.98       427\n",
            "   macro avg       0.98      0.98      0.98       427\n",
            "weighted avg       0.98      0.98      0.98       427\n",
            "\n",
            "\n",
            "Confusion Matrix:\n",
            " [[191   4]\n",
            " [  4 228]]\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "**Model 4: AraBERT Embeddings + Logistic Regression**\n",
        "\n",
        "In this step, I use a pre-trained Arabic language model (AraBERT) to generate contextual embeddings for each news article.\n",
        "\n",
        "Unlike TF-IDF, which is frequency-based, AraBERT captures:\n",
        "1. Context\n",
        "2. Semantic meaning\n",
        "3. Word relationships\n",
        "\n",
        "We extract the CLS token embedding for each text and use it as input features for a Logistic Regression classifier."
      ],
      "metadata": {
        "id": "7AcXCE3ixyV_"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Install Transformers\n",
        "!pip -q install transformers"
      ],
      "metadata": {
        "id": "_HeYF7wUyQzO"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "# Load AraBERT Model\n",
        "import torch\n",
        "from transformers import AutoTokenizer, AutoModel\n",
        "\n",
        "model_name = \"aubmindlab/bert-base-arabertv02\"\n",
        "\n",
        "tokenizer = AutoTokenizer.from_pretrained(model_name)\n",
        "bert_model = AutoModel.from_pretrained(model_name)\n",
        "\n",
        "bert_model.eval()\n",
        "device = torch.device(\"cpu\")\n",
        "bert_model.to(device)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000,
          "referenced_widgets": [
            "7f7c3deb38384bf98e1599e45e6dad49",
            "17df5d090d9a4148b26818f2a1512a27",
            "0f1af1b9b8a448c38b939e18f80fea78",
            "6647876fbc5447f7bb6fcde8e4b64ec9",
            "d23b86e993964853be25fa0123151cb9",
            "5970067289174a01870a1871182a1855",
            "74078600e21a44f3bec57fcc6cb070f0",
            "fe60d3d9617e4ef1942bc03da685327c",
            "034f1309489b4c9dac9cb7488a7eb12a",
            "98fde43d80fd429280c777acd5bc4cd8",
            "b9a2bb0e0b2f43e38892f60b77eb59d2",
            "909316e4e308489f94d401dc6be089e5",
            "824cf71ae5144200a37614b194fd6d82",
            "7eb5f5deaca8482ebd1ead2ab555a777",
            "c38b3286c898412aba55af1d6b337e65",
            "4be0d86b34944c169721428de8bd302a",
            "555271ce87b54cae84c6aaf550d6306b",
            "6cfd6bc234d742b4aaf39ab95c421340",
            "36eb73ff02cd4d299f355d731f38b9e8",
            "73b64428422d4ae29b97b3f371c529fd",
            "391ce27e9d2a49b5bc6dc1095f67dfb8",
            "b9476278243f4f2b9b1cbd42e4dd6b0a",
            "11f0d426f45349b68caad10df7574596",
            "a9c13fdb16274cc18f7e3961008e4888",
            "a0db392ed076408ca9af662242f65055",
            "ef5a232ef1184921b5acaf074986c5d2",
            "ca3fd2dfd26c427f83dbc22df1f9585c",
            "2ec08c40b72543568f5c5205bdb3e2ba",
            "90d7eceb6e9c4be8bd22ffbb4be5e00b",
            "f477e6eb8b3e4cadb0ecf6ab2731f731",
            "82bc6fbef7074056a757ef5b27c3bba9",
            "381a9efff83947c394ce59ebc792a87d",
            "0f8e166bd5f246c1b6c3058893edc1ac",
            "989219a1cdd441c8aaaf2e777326d573",
            "d1403363194d4c3c82672928b7005c8a",
            "bb72583bb43e417e816adf28d9ac4a73",
            "c4c523179726422ebff436d9e6a8903f",
            "50b77d4e8dff42bf9b53c6d136e93f99",
            "281466ff4d7a4677902b21a4972ba6eb",
            "1da382b5de5d4cc68eff6d0975ef94df",
            "2c66c12aedac4c2bae3232a3a94ad2d3",
            "cf220a9b4b544b089ab430b13624ec76",
            "a0242a9199b14d869f8fd332aae818b4",
            "2144ba99020742e9a042b202a7da7248",
            "e4663380b8a1406ab290b4a4d637c20c",
            "71e9b06cfa9d48e6a5a60c5d594cce23",
            "95c2d7216e6f4c51a983b95f97dbb334",
            "2fe1596177544b839d9fa41a4a84c469",
            "27e0462dc57e49438ac38748f737bd55",
            "f7f380e9b80d4cdd99a409651e243d7f",
            "74f11fe8e76247b8b82a5157da6e8888",
            "68435f04eeed42c891b528ed8a2a6e3a",
            "c73582cd9ab14a34a9586703dc30547b",
            "5555a72f295a4ee1a20c34c621895ea4",
            "21118d10acc146acacd16b011a7faf64",
            "7574cadcf628481ebb35ff24a3dce20c",
            "dd0bf850c33542878e9cf1058ea71bc7",
            "572959525946468393c8f4067c8c43a9",
            "6ff5d6840e334de9b536cbb6409a9188",
            "3d67f4c7ce85468ab5b83838e3011ef7",
            "14a9cd0a0d274f62a437d22b6db2f419",
            "f95512c9a9814d3bb5f79ee3aa4191a6",
            "73dbabfd1d674b68a0ae5e23b3b09981",
            "93393797ced644a68a2265a0ab5d07f5",
            "6138d18f461f4b17b18d15aaebc53e72",
            "19d0fd6189c441838c9895c303d91058",
            "8e90f83cb1e24c1aa03fc22f2e5a4560",
            "44e399dd2bd64672acbbafcc74d2af14",
            "a4487eb01a4b470b91e005ff1bcbd301",
            "7ff4dd8e19004694a6212670411c0993",
            "72190d19f96a4ed7a4754804294fbc9c",
            "af126faf38d3498f9e12e250c9fd7924",
            "fc1c2905d53b4426bc7eee51457df417",
            "894f95a4c46941cda501d3bbafd66024",
            "55ce665363104a18a6e654c4185a8777",
            "36f8e9fbf6a942f8806fd14eca210105",
            "8dd75fed00574a838fef06403beaafb4"
          ]
        },
        "id": "j-4GdzXyyfX1",
        "outputId": "3dc9b05a-0371-48fd-8f8c-4c5eb4caa4ca"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "/usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_auth.py:94: UserWarning: \n",
            "The secret `HF_TOKEN` does not exist in your Colab secrets.\n",
            "To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n",
            "You will be able to reuse this secret in all of your notebooks.\n",
            "Please note that authentication is recommended but still optional to access public models or datasets.\n",
            "  warnings.warn(\n",
            "Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.\n",
            "WARNING:huggingface_hub.utils._http:Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.\n"
          ]
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "config.json:   0%|          | 0.00/384 [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "7f7c3deb38384bf98e1599e45e6dad49"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "tokenizer_config.json:   0%|          | 0.00/381 [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "909316e4e308489f94d401dc6be089e5"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "vocab.txt: 0.00B [00:00, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "11f0d426f45349b68caad10df7574596"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "tokenizer.json: 0.00B [00:00, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "989219a1cdd441c8aaaf2e777326d573"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "special_tokens_map.json:   0%|          | 0.00/112 [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "e4663380b8a1406ab290b4a4d637c20c"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "model.safetensors:   0%|          | 0.00/543M [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "7574cadcf628481ebb35ff24a3dce20c"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "Loading weights:   0%|          | 0/199 [00:00<?, ?it/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "8e90f83cb1e24c1aa03fc22f2e5a4560"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "BertModel LOAD REPORT from: aubmindlab/bert-base-arabertv02\n",
            "Key                                        | Status     |  | \n",
            "-------------------------------------------+------------+--+-\n",
            "cls.predictions.transform.dense.bias       | UNEXPECTED |  | \n",
            "cls.predictions.bias                       | UNEXPECTED |  | \n",
            "cls.predictions.transform.LayerNorm.weight | UNEXPECTED |  | \n",
            "cls.predictions.transform.dense.weight     | UNEXPECTED |  | \n",
            "cls.seq_relationship.bias                  | UNEXPECTED |  | \n",
            "cls.seq_relationship.weight                | UNEXPECTED |  | \n",
            "cls.predictions.transform.LayerNorm.bias   | UNEXPECTED |  | \n",
            "bert.embeddings.position_ids               | UNEXPECTED |  | \n",
            "\n",
            "Notes:\n",
            "- UNEXPECTED\t:can be ignored when loading from different task/architecture; not ok if you expect identical arch.\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "BertModel(\n",
              "  (embeddings): BertEmbeddings(\n",
              "    (word_embeddings): Embedding(64000, 768, padding_idx=0)\n",
              "    (position_embeddings): Embedding(512, 768)\n",
              "    (token_type_embeddings): Embedding(2, 768)\n",
              "    (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
              "    (dropout): Dropout(p=0.1, inplace=False)\n",
              "  )\n",
              "  (encoder): BertEncoder(\n",
              "    (layer): ModuleList(\n",
              "      (0-11): 12 x BertLayer(\n",
              "        (attention): BertAttention(\n",
              "          (self): BertSelfAttention(\n",
              "            (query): Linear(in_features=768, out_features=768, bias=True)\n",
              "            (key): Linear(in_features=768, out_features=768, bias=True)\n",
              "            (value): Linear(in_features=768, out_features=768, bias=True)\n",
              "            (dropout): Dropout(p=0.1, inplace=False)\n",
              "          )\n",
              "          (output): BertSelfOutput(\n",
              "            (dense): Linear(in_features=768, out_features=768, bias=True)\n",
              "            (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
              "            (dropout): Dropout(p=0.1, inplace=False)\n",
              "          )\n",
              "        )\n",
              "        (intermediate): BertIntermediate(\n",
              "          (dense): Linear(in_features=768, out_features=3072, bias=True)\n",
              "          (intermediate_act_fn): GELUActivation()\n",
              "        )\n",
              "        (output): BertOutput(\n",
              "          (dense): Linear(in_features=3072, out_features=768, bias=True)\n",
              "          (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
              "          (dropout): Dropout(p=0.1, inplace=False)\n",
              "        )\n",
              "      )\n",
              "    )\n",
              "  )\n",
              "  (pooler): BertPooler(\n",
              "    (dense): Linear(in_features=768, out_features=768, bias=True)\n",
              "    (activation): Tanh()\n",
              "  )\n",
              ")"
            ]
          },
          "metadata": {},
          "execution_count": 28
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "# Generate Embeddings\n",
        "import numpy as np\n",
        "import torch\n",
        "\n",
        "@torch.no_grad()\n",
        "def get_embeddings(texts, batch_size=16, max_length=128):\n",
        "    all_embs = []\n",
        "    for i in range(0, len(texts), batch_size):\n",
        "        batch_texts = texts[i:i+batch_size].tolist()\n",
        "\n",
        "        inputs = tokenizer(\n",
        "            batch_texts,\n",
        "            padding=True,\n",
        "            truncation=True,\n",
        "            max_length=max_length,\n",
        "            return_tensors=\"pt\"\n",
        "        ).to(device)\n",
        "\n",
        "        outputs = bert_model(**inputs)\n",
        "        cls_emb = outputs.last_hidden_state[:, 0, :].cpu().numpy()  # CLS embeddings\n",
        "        all_embs.append(cls_emb)\n",
        "\n",
        "    return np.vstack(all_embs)\n",
        "\n",
        "print(\"Generating training embeddings...\")\n",
        "X_train_emb = get_embeddings(X_train, batch_size=16, max_length=128)\n",
        "\n",
        "print(\"Generating testing embeddings...\")\n",
        "X_test_emb = get_embeddings(X_test, batch_size=16, max_length=128)\n",
        "\n",
        "print(\"Train embeddings shape:\", X_train_emb.shape)\n",
        "print(\"Test embeddings shape:\", X_test_emb.shape)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "UmT2GfO2zVPp",
        "outputId": "c3dad885-f0f7-4e4e-844f-37d323b932cb"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Generating training embeddings...\n",
            "Generating testing embeddings...\n",
            "Train embeddings shape: (1756, 768)\n",
            "Test embeddings shape: (440, 768)\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "# Train Logistic Regression on AraBERT Embeddings\n",
        "from sklearn.linear_model import LogisticRegression\n",
        "from sklearn.metrics import accuracy_score, classification_report, confusion_matrix\n",
        "\n",
        "bert_lr = LogisticRegression(max_iter=2000)\n",
        "bert_lr.fit(X_train_emb, y_train)\n",
        "\n",
        "y_pred_bert = bert_lr.predict(X_test_emb)\n",
        "\n",
        "bert_accuracy = accuracy_score(y_test, y_pred_bert)\n",
        "\n",
        "print(\"AraBERT + Logistic Regression Accuracy:\", round(bert_accuracy, 4))\n",
        "\n",
        "print(\"\\nClassification Report:\\n\")\n",
        "print(classification_report(y_test, y_pred_bert))\n",
        "\n",
        "print(\"\\nConfusion Matrix:\\n\")\n",
        "print(confusion_matrix(y_test, y_pred_bert))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "5ZRAhKxI24J0",
        "outputId": "52e74651-ebcb-4ed6-f38e-a6129189f1d9"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "AraBERT + Logistic Regression Accuracy: 0.9977\n",
            "\n",
            "Classification Report:\n",
            "\n",
            "              precision    recall  f1-score   support\n",
            "\n",
            "        fake       1.00      1.00      1.00       200\n",
            "        real       1.00      1.00      1.00       240\n",
            "\n",
            "    accuracy                           1.00       440\n",
            "   macro avg       1.00      1.00      1.00       440\n",
            "weighted avg       1.00      1.00      1.00       440\n",
            "\n",
            "\n",
            "Confusion Matrix:\n",
            "\n",
            "[[200   0]\n",
            " [  1 239]]\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "# Redefine features and labels\n",
        "X = df[\"content\"]\n",
        "y = df[\"label\"]\n",
        "\n",
        "from sklearn.model_selection import train_test_split\n",
        "\n",
        "X_train, X_test, y_train, y_test = train_test_split(\n",
        "    X,\n",
        "    y,\n",
        "    test_size=0.2,\n",
        "    random_state=42,\n",
        "    stratify=y\n",
        ")\n",
        "\n",
        "print(\"New Training size:\", len(X_train))\n",
        "print(\"New Testing size:\", len(X_test))\n",
        "\n",
        "print(\"\\nNew Training distribution:\\n\", y_train.value_counts())\n",
        "print(\"\\nNew Testing distribution:\\n\", y_test.value_counts())"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "-ce5Am3P5Klr",
        "outputId": "b8da8665-c5c6-4165-cb7c-3cafe1b123de"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "New Training size: 1708\n",
            "New Testing size: 427\n",
            "\n",
            "New Training distribution:\n",
            " label\n",
            "real    930\n",
            "fake    778\n",
            "Name: count, dtype: int64\n",
            "\n",
            "New Testing distribution:\n",
            " label\n",
            "real    232\n",
            "fake    195\n",
            "Name: count, dtype: int64\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "@torch.no_grad()\n",
        "def get_embeddings(texts, batch_size=16, max_length=128):\n",
        "    all_embs = []\n",
        "    for i in range(0, len(texts), batch_size):\n",
        "        batch_texts = texts[i:i+batch_size].tolist()\n",
        "\n",
        "        inputs = tokenizer(\n",
        "            batch_texts,\n",
        "            padding=True,\n",
        "            truncation=True,\n",
        "            max_length=max_length,\n",
        "            return_tensors=\"pt\"\n",
        "        ).to(device)\n",
        "\n",
        "        outputs = bert_model(**inputs)\n",
        "        cls_emb = outputs.last_hidden_state[:, 0, :].cpu().numpy()\n",
        "        all_embs.append(cls_emb)\n",
        "\n",
        "    return np.vstack(all_embs)\n",
        "\n",
        "print(\"Generating training embeddings...\")\n",
        "X_train_emb = get_embeddings(X_train, batch_size=16, max_length=128)\n",
        "\n",
        "print(\"Generating testing embeddings...\")\n",
        "X_test_emb = get_embeddings(X_test, batch_size=16, max_length=128)\n",
        "\n",
        "print(\"Train embeddings shape:\", X_train_emb.shape)\n",
        "print(\"Test embeddings shape:\", X_test_emb.shape)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "f7Vqjx3PLLPe",
        "outputId": "a77e8c12-4966-439d-fd1a-4129fb774ee1"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Generating training embeddings...\n",
            "Generating testing embeddings...\n",
            "Train embeddings shape: (1708, 768)\n",
            "Test embeddings shape: (427, 768)\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "**Train Logistic Regression on Embeddings**\n",
        "\n",
        "In this step, we train Logistic Regression using AraBERT embeddings as input features.\n",
        "This combines deep semantic representations (AraBERT) with a lightweight classifier (LR).\n",
        "We then evaluate performance using accuracy, classification report, and confusion matrix."
      ],
      "metadata": {
        "id": "_gxkPnANLdSy"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.linear_model import LogisticRegression\n",
        "from sklearn.metrics import accuracy_score, classification_report, confusion_matrix\n",
        "\n",
        "bert_lr = LogisticRegression(max_iter=2000)\n",
        "bert_lr.fit(X_train_emb, y_train)\n",
        "\n",
        "y_pred_bert = bert_lr.predict(X_test_emb)\n",
        "bert_accuracy = accuracy_score(y_test, y_pred_bert)\n",
        "\n",
        "print(\"AraBERT + Logistic Regression Accuracy:\", round(bert_accuracy, 4))\n",
        "print(\"\\nClassification Report:\\n\", classification_report(y_test, y_pred_bert))\n",
        "print(\"\\nConfusion Matrix:\\n\", confusion_matrix(y_test, y_pred_bert))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "q14givN0LkoI",
        "outputId": "71708496-8eaa-4e57-8d0d-55773195ae65"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "AraBERT + Logistic Regression Accuracy: 0.9953\n",
            "\n",
            "Classification Report:\n",
            "               precision    recall  f1-score   support\n",
            "\n",
            "        fake       0.99      1.00      0.99       195\n",
            "        real       1.00      0.99      1.00       232\n",
            "\n",
            "    accuracy                           1.00       427\n",
            "   macro avg       0.99      1.00      1.00       427\n",
            "weighted avg       1.00      1.00      1.00       427\n",
            "\n",
            "\n",
            "Confusion Matrix:\n",
            " [[195   0]\n",
            " [  2 230]]\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "**To validate** the robustness of the AraBERT model, we perform 5-fold cross-validation using Logistic Regression on AraBERT embeddings.\n",
        "We compute:\n",
        "\n",
        "1. Mean accuracy\n",
        "2. Standard deviation\n",
        "\n",
        "A low standard deviation indicates stable and reliable performance across folds"
      ],
      "metadata": {
        "id": "i4fZIlWDO1Om"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.model_selection import cross_val_score\n",
        "from sklearn.linear_model import LogisticRegression\n",
        "import numpy as np\n",
        "\n",
        "bert_lr_cv = LogisticRegression(max_iter=2000)\n",
        "\n",
        "scores = cross_val_score(\n",
        "    bert_lr_cv,\n",
        "    X_train_emb,\n",
        "    y_train,\n",
        "    cv=5,\n",
        "    scoring='accuracy'\n",
        ")\n",
        "\n",
        "print(\"Cross-Validation Scores:\",scores)\n",
        "print(\"Mean Accuracy:\", round(scores.mean(), 4))\n",
        "print(\"Standard Deviation:\", round(scores.std(), 4))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "s_ySLKY1Pibv",
        "outputId": "29e19a81-93ea-4867-ad0b-05b667ecb4f4"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Cross-Validation Scores: [1.         0.99707602 0.99707602 0.99120235 1.        ]\n",
            "Mean Accuracy: 0.9971\n",
            "Standard Deviation: 0.0032\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "To further validate the robustness of the AraBERT model, 5-fold cross-validation was conducted.\n",
        "The model achieved a mean accuracy of 99.71% with a standard deviation of 0.32%.\n",
        "\n",
        "The very low standard deviation indicates highly stable performance across different data splits, confirming that the model’s high accuracy is consistent and not due to random variation or favorable partitioning.\n",
        "\n",
        "These results demonstrate that AraBERT provides reliable and generalizable performance for Arabic fake news detection."
      ],
      "metadata": {
        "id": "87xD2I1oQZcG"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "plt.figure()\n",
        "\n",
        "mean_accuracy = scores.mean() * 100\n",
        "std_accuracy = scores.std() * 100\n",
        "\n",
        "plt.bar([\"AraBERT + LR\"], [mean_accuracy], yerr=[std_accuracy], capsize=10)\n",
        "\n",
        "plt.title(\"AraBERT Cross-Validation Accuracy\")\n",
        "plt.ylabel(\"Accuracy (%)\")\n",
        "plt.ylim(95, 100)\n",
        "\n",
        "plt.show()"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 452
        },
        "id": "EMf2DOtVQLE-",
        "outputId": "4fb1a93f-766e-4ff9-c0a5-a624d972b136"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 640x480 with 1 Axes>"
            ],
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjsAAAGzCAYAAADJ3dZzAAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjEwLjAsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvlHJYcgAAAAlwSFlzAAAPYQAAD2EBqD+naQAAPZhJREFUeJzt3XlUVfX+//HXYUYmJ1RQQwUFp0zJVK6zOIUDqKVmOZTZoKll9rvWdUgtzVvdskErp8LZlJxKxMypzHnWzDEn1ExlUEKB/fujxfl6AhTwILh7Ptbaa3k++7M/+72PyHn52cOxGIZhCAAAwKQcCrsAAACAgkTYAQAApkbYAQAApkbYAQAApkbYAQAApkbYAQAApkbYAQAApkbYAQAApkbYAQAApkbYAfCP0rdvX1WqVMmmzWKxaMyYMXfcdsyYMbJYLHat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NlmvY+Pj3x9fXXkyBFt3749y3oAAPDPVORndmJjY2UYhoKDg3X06FENHz5cISEh6tevnyRp0aJF8vX11QMPPKB9+/ZpyJAhioyMVJs2bQq5cgAAUBQU+bCTkJCgESNG6MyZMypZsqS6du2qt956S87OzpKk+Ph4vfLKK7pw4YL8/PzUu3dvjRw5spCrBgAARUWRfs7OvcJzdgAAKDg8ZwcAAKAAEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpEXYAAICpOeWlc0ZGhtavX6+NGzfqt99+0/Xr1+Xr66u6desqPDxcFStWLKg6AQAA8iVXMzspKSkaP368KlasqEcffVTfffedrl69KkdHRx09elSjR49W5cqV9eijj+rnn38u6JoBAAByLVczO9WqVVOjRo30xRdfqHXr1nJ2ds7S57ffftPcuXPVo0cPvfHGG3r22WftXiwAAEBe5WpmZ/Xq1Vq4cKEeffTRbIOOJAUEBGjEiBE6cuSIWrZsabcCk5KSNHToUAUEBMjd3V1hYWHatm2bdX1ycrIGDRqkChUqyN3dXTVq1NDUqVPttn8AAHB/y9XMTvXq1XM9oLOzswIDA/Nd0N/1799f+/fvV3R0tPz9/TV79myFh4fr4MGDKl++vF555RWtXbtWs2fPVqVKlbR69Wq9+OKL8vf3V6dOnexWBwAAuD/l+26stLQ0ffLJJ3rsscfUpUsXvffee/rzzz/tWZtSUlK0ePFiTZo0SU2bNlVQUJDGjBmjoKAgTZkyRZL0008/qU+fPmrevLkqVaqkAQMGqE6dOtq6datdawEAAPenfIedwYMHKyYmRi1atFCzZs00d+5c9evXz561KS0tTenp6XJzc7Npd3d316ZNmyRJYWFhWrZsmc6ePSvDMPTDDz/o119/VZs2bXIcNzU1VYmJiTYLAAAwp1zfeh4TE6OoqCjr69WrV+vw4cNydHSUJLVt21YNGza0a3FeXl5q1KiRxo0bp+rVq6ts2bKaN2+eNm/erKCgIEnSRx99pAEDBqhChQpycnKSg4ODvvjiCzVt2jTHcSdMmKA333zTrrUCAICiKdczOzNmzFBkZKTOnTsnSapXr56ef/55rVq1SsuXL9drr72m+vXr273A6OhoGYah8uXLy9XVVZMnT1bPnj3l4PBX6R999JF+/vlnLVu2TDt27NB7772ngQMHas2aNTmOOWLECCUkJFiX06dP271uAABQNFgMwzBy23nBggUaOXKkXnrpJT311FMaN26c1q1bp/T0dP3rX//SmDFj5OvrWyCFXrt2TYmJifLz81P37t2VnJysr7/+Wj4+PoqJiVFERIS1b//+/XXmzBmtWrUqV2MnJibKx8dHCQkJ8vb2tmvdlf690q7jAQBwvzk5MeLOnfIht5/febpmp3v37tq6dav27duntm3b6sknn9SOHTu0e/duffLJJwUWdCTJw8NDfn5+unLlimJjY9W5c2fdvHlTN2/etM7yZHJ0dFRGRkaB1QIAAO4fefq6CEkqXry4Pv/8c23YsEG9e/dWu3btNG7cuCwXEdtLbGysDMNQcHCwjh49quHDhyskJET9+vWTs7OzmjVrpuHDh8vd3V0BAQFav369vvrqK73//vsFUg8AALi/5Hpm59SpU3r88cdVu3Zt9erVS1WrVtWOHTtUrFgx1alTR999912BFJiQkKCBAwcqJCREvXv3VuPGjRUbG2t9uOH8+fNVv3599erVSzVq1NDEiRP11ltv6fnnny+QegAAwP0l19fsNG/eXOXKlVPfvn0VGxurY8eOadmyZZKkQ4cO6bnnnlO5cuW0cOHCAi24IH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hRfu6XdiJSQkaMSIETpz5oxKliyprl276q233pKzs7O1z/z582UYhnr27HnP6gIAAPeHXM/sbNq0SUlJSQoNDVWDBg308ccf69KlSwVZmyTp8ccf17Fjx5Samqr4+Hh9/PHH8vHxsekzYMAAXb9+PUs7AABArsNOw4YN9cUXXyg+Pl7PPfec5s+fL39/f2VkZCguLk5JSUkFWScAAEC+5PluLA8PDz399NPatGmT9u3bp2HDhmnixIkqU6aMOnXqVBA1AgAA5NtdPWcnODhYkyZN0pkzZzRv3jx71QQAAGA3d/1QQUlydHRUZGSkli1bZo/hAAAA7MYuYQcAAKCoIuwAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTI+wAAABTK/JhJykpSUOHDlVAQIDc3d0VFhambdu22fQ5dOiQOnXqJB8fH3l4eKh+/fo6depUIVUMAACKkiIfdvr376+4uDhFR0dr3759atOmjcLDw3X27FlJ0rFjx9S4cWOFhIRo3bp12rt3r0aOHCk3N7dCrhwAABQFFsMwjMIuIicpKSny8vLS0qVLFRERYW0PDQ1V+/btNX78ePXo0UPOzs6Kjo7O9bipqalKTU21vk5MTFTFihWVkJAgb29vux5DpX+vtOt4AADcb05OjLhzp3xITEyUj4/PHT+/i/TMTlpamtLT07PM0ri7u2vTpk3KyMjQypUrVa1aNbVt21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PGDZt+Pj4+CgoKkiQFBQVp+vTp8vPz04IFC9S/f39rv4oVK1r7ZcfBwcG6vnr16jp27JheeOEFRUdH5/v4p02bppSUFOvrqlWr6ttvv1X58uUlyS6hpGLFiqpataqqVq2qtLQ0RUVFaf/+/XyBKWAHzOwAuK20tDR99dVXeu+992xmU/bs2SN/f3/Nmzfvttv/+OOP6tu3r6KiolS7dm2VK1cuV3cyZV5jc2vIyI9///vfWrBgQbYXO+dW+fLlFRQUZF0kKSAgwPo6ICDgrmr8u27dusnJyUmffvqpXccF/qmY2QFwWytWrNCVK1f0zDPP2MzgSFLXrl01ffp0Pf/88zluX7VqVS1ZskQdO3aUxWLRyJEjlZGRkaXf9evXdf78eUnShQsXNG7cOLm5ualNmzY2/f744w9rv0zFixeXm5tbtvuvWLGioqKiNGrUKK1YsSJXx1wQzp49m+WUW04hyWKxaPDgwRozZoyee+45FStW7B5UCJgXMzsAbmv69OkKDw/PEnSkv8LO9u3btXfv3hy3f//991WiRAmFhYWpY8eOatu2rerVq5el3xdffCE/Pz/5+fmpRYsWunTpkr799lsFBwfb9AsPD7f2y1y++eab2x7Dyy+/rJUrV2rr1q25O+gC8O6776pu3bo2y8qVK3Ps36dPH928eVMff/zxPawSMCeLkd29owAAACbBzA4AADA1wg4AADA1wg4AADA1wg4AADA1wg4AADA1wg4AADA1wg4AADA1wg4AADA1wg4AADA1wg4AADA1wg4AADC1/w/1JyYtTqQroAAAAABJRU5ErkJggg==\n"
          },
          "metadata": {}
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "**Final Comparison (All 4 Models)**\n",
        "\n",
        "This step summarizes and compares the accuracy of all four models in one table.\n",
        "This provides a clear view of which approach performs best for Arabic fake news detection."
      ],
      "metadata": {
        "id": "l6duidfTL6Uk"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "import pandas as pd\n",
        "\n",
        "comparison = pd.DataFrame({\n",
        "    \"Model\": [\n",
        "        \"TF-IDF + Logistic Regression\",\n",
        "        \"TF-IDF + Naive Bayes\",\n",
        "        \"TF-IDF + SVM\",\n",
        "        \"AraBERT + Logistic Regression\"\n",
        "    ],\n",
        "    \"Accuracy\": [\n",
        "        lr_accuracy,\n",
        "        nb_accuracy,\n",
        "        svm_accuracy,\n",
        "        bert_accuracy\n",
        "    ]\n",
        "}).sort_values(\"Accuracy\", ascending=False)\n",
        "\n",
        "comparison"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 175
        },
        "id": "4c4s5z96MEVh",
        "outputId": "61e18aa2-f725-418e-d0f5-ed5ae2f12593"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                           Model  Accuracy\n",
              "3  AraBERT + Logistic Regression  0.995316\n",
              "0   TF-IDF + Logistic Regression  0.981265\n",
              "2                   TF-IDF + SVM  0.981265\n",
              "1           TF-IDF + Naive Bayes  0.948478"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-48c5823d-6ce4-4a78-8b35-f1534d050342\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Model</th>\n",
              "      <th>Accuracy</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>AraBERT + Logistic Regression</td>\n",
              "      <td>0.995316</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>TF-IDF + Logistic Regression</td>\n",
              "      <td>0.981265</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>TF-IDF + SVM</td>\n",
              "      <td>0.981265</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>TF-IDF + Naive Bayes</td>\n",
              "      <td>0.948478</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-48c5823d-6ce4-4a78-8b35-f1534d050342')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-48c5823d-6ce4-4a78-8b35-f1534d050342 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-48c5823d-6ce4-4a78-8b35-f1534d050342');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "  <div id=\"id_47a9d108-38f6-4abe-8a7f-a792ca75c6dd\">\n",
              "    <style>\n",
              "      .colab-df-generate {\n",
              "        background-color: #E8F0FE;\n",
              "        border: none;\n",
              "        border-radius: 50%;\n",
              "        cursor: pointer;\n",
              "        display: none;\n",
              "        fill: #1967D2;\n",
              "        height: 32px;\n",
              "        padding: 0 0 0 0;\n",
              "        width: 32px;\n",
              "      }\n",
              "\n",
              "      .colab-df-generate:hover {\n",
              "        background-color: #E2EBFA;\n",
              "        box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "        fill: #174EA6;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate {\n",
              "        background-color: #3B4455;\n",
              "        fill: #D2E3FC;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate:hover {\n",
              "        background-color: #434B5C;\n",
              "        box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "        filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "        fill: #FFFFFF;\n",
              "      }\n",
              "    </style>\n",
              "    <button class=\"colab-df-generate\" onclick=\"generateWithVariable('comparison')\"\n",
              "            title=\"Generate code using this dataframe.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "    <script>\n",
              "      (() => {\n",
              "      const buttonEl =\n",
              "        document.querySelector('#id_47a9d108-38f6-4abe-8a7f-a792ca75c6dd button.colab-df-generate');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      buttonEl.onclick = () => {\n",
              "        google.colab.notebook.generateWithVariable('comparison');\n",
              "      }\n",
              "      })();\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "comparison",
              "summary": "{\n  \"name\": \"comparison\",\n  \"rows\": 4,\n  \"fields\": [\n    {\n      \"column\": \"Model\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 4,\n        \"samples\": [\n          \"TF-IDF + Logistic Regression\",\n          \"TF-IDF + Naive Bayes\",\n          \"AraBERT + Logistic Regression\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Accuracy\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0.019871853335453295,\n        \"min\": 0.9484777517564403,\n        \"max\": 0.9953161592505855,\n        \"num_unique_values\": 3,\n        \"samples\": [\n          0.9953161592505855,\n          0.9812646370023419,\n          0.9484777517564403\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {},
          "execution_count": 59
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "accuracies = [\n",
        "    lr_accuracy * 100,\n",
        "    nb_accuracy * 100,\n",
        "    svm_accuracy * 100,\n",
        "    bert_accuracy * 100\n",
        "]"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 211
        },
        "id": "S-d_Q2uAO2Uc",
        "outputId": "ec348c6d-516f-4238-ac8a-9297c60475b6"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "error",
          "ename": "NameError",
          "evalue": "name 'lr_accuracy' is not defined",
          "traceback": [
            "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
            "\u001b[0;31mNameError\u001b[0m                                 Traceback (most recent call last)",
            "\u001b[0;32m/tmp/ipython-input-2684992925.py\u001b[0m in \u001b[0;36m<cell line: 0>\u001b[0;34m()\u001b[0m\n\u001b[1;32m      1\u001b[0m accuracies = [\n\u001b[0;32m----> 2\u001b[0;31m     \u001b[0mlr_accuracy\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0;36m100\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      3\u001b[0m     \u001b[0mnb_accuracy\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0;36m100\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      4\u001b[0m     \u001b[0msvm_accuracy\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0;36m100\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      5\u001b[0m     \u001b[0mbert_accuracy\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0;36m100\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;31mNameError\u001b[0m: name 'lr_accuracy' is not defined"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "**Final Model Comparison and Results**\n",
        "\n",
        "In this study, four different models were evaluated for Arabic fake news detection. After data cleaning (removal of missing values and duplicate entries) and applying a stratified train/test split, the final accuracy results were as follows:\n",
        "\n",
        "1. TF-IDF + Logistic Regression: 98.13%\n",
        "\n",
        "2. TF-IDF + Naive Bayes: 94.85%\n",
        "\n",
        "3. TF-IDF + Support Vector Machine (SVM): 98.13%\n",
        "\n",
        "4. AraBERT + Logistic Regression: 99.53%\n",
        "\n",
        "The results indicate that classical TF-IDF-based models achieved strong performance, with both Logistic Regression and SVM reaching 98.13% accuracy. Naive Bayes achieved slightly lower performance at 94.85%.\n",
        "\n",
        "AraBERT combined with Logistic Regression achieved the highest performance at 99.53%, demonstrating the effectiveness of contextual embeddings in capturing semantic meaning and linguistic structure in Arabic text.\n",
        "\n",
        "Importantly, duplicate samples were removed before final training to prevent potential data leakage. The AraBERT model maintained its high accuracy even after duplicate removal, confirming the robustness and reliability of the results.\n",
        "\n",
        "These findings highlight that transformer-based models significantly outperform traditional frequency-based approaches in Arabic fake news detection tasks."
      ],
      "metadata": {
        "id": "sLA6lBArNW-c"
      }
    }
  ]
}