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QKj+IBU9S4ehouEngQAmZGyoe+G5JxJBjHbTyu88EYgtZttWIAihD71Qizle46DC+SF8ofdaBG6GJjtcn4YK8vDqC+TxPo7XQjjkIYSfHYYxCfAjhCHPUvh1cbzaQYeTNF7TgHq7wigmoT6iQ2EIiGWSJ+ma2bAHBUvH7/7rg/7GweBaA0z7jRl9gJqSPmzMmMiQClpmPvKOOXwUYTo3H3lFVCnWSzDkwUunZj8xL7PcO1tABe01dKTazJjrJWexKiTCSoKAkEkLYYZ5b6eW+DDilmfrVurfba0+pcYvTeUJmaSptURXQSDBCMjUcIIbR1QTBNKEgJBJmlpLdBUEEoyAkEmCG0dUEwTShICQSZpaS3QVBBKMgJBJghtHVBME0oSAkEmaWkt0FQQSjICQSYIbR1QTBNKEgJBJmlpLdBUEEoyAkEmCG0dUEwTShICQSZpaS3QVBBKMgJBJghtHVBME0oSAkEmaWkt0FQQSjICQSYIbR1QTBNKEgJBJmlpLdBUEEoyAkEmCG0dUEwTShICQSZpaS3QVBBKMgJBJghtHVBME0oSAkEmaWkt0FQQSjICQSYIbR1QTBNKEgJBJmlpLdBUEEoyAkEmCG0dUEwTShICQSZpaS3QVBBKMgJBJghtHVBME0oSAkEmaWkt0FQQSjICQSYIbR1QTBNKEgJBJmlpLdBUEEoyAkEmCG0dUEwTShICQSZpaS3QVBBKMgJBJghtHVBME0oTA/wNyEk+UDr26LwAAAABJRU5ErkJggg==" } }, "cell_type": "markdown", "metadata": {}, "source": [ "![imagen.png](attachment:imagen.png)\n", "

Hugging Face

" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Fuente de este demo: https://www.youtube.com/watch?v=4yhYu1emS3M" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1. Acerca de Hugging Face y Transformers \n", "#### Hugging Face:\n", "\"Hugging Face, Inc. is an American company that develops tools for building applications using machine learning.[1] It is most notable for its transformers library built for natural language processing applications and its platform that allows users to share machine learning models and datasets.\" Fuente: Wikipedia." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Transformers:\n", "Transformers proporciona API y herramientas para descargar y entrenar fácilmente modelos preentrenados de última generación. El uso de modelos preentrenados puede reducir los costos de cómputo, la huella de carbono y ahorrarle el tiempo y los recursos necesarios para entrenar un modelo desde cero. Fuente: sitio de Hugging Face" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Clasificación de Modelos\n", "Los modelos pre-entrenados pueden descargarse de: https://huggingface.co/models. Allí se dispone de más de 170.000 modelos pre-entrenados. Y para usarlos, debe descargarse los mismos en forma explícita. Sin embargo, es posible realizar tareas sin usar modelos específicos, pero el \"auto-ML\" trae problemas con muchos idiomas.\n", "Los Las tareas de modelos pre-entrenados se clasifican en:\n", "* ML multimedial\n", "* Computer Vision\n", "* NLP\n", "* Audio\n", "* Aprendizaje reforzado\n", "## 2. Inicializacion" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Collecting numpy\n", " Using cached numpy-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.3 MB)\n", "Installing collected packages: numpy\n", " Attempting uninstall: numpy\n", " Found existing installation: numpy 2.1.2\n", " Uninstalling numpy-2.1.2:\n", " Successfully uninstalled numpy-2.1.2\n", "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", "gensim 4.3.0 requires FuzzyTM>=0.4.0, which is not installed.\n", "tables 3.8.0 requires blosc2~=2.0.0, which is not installed.\n", "tables 3.8.0 requires cython>=0.29.21, which is not installed.\n", "numba 0.57.0 requires numpy<1.25,>=1.21, but you have numpy 2.1.2 which is incompatible.\n", "thinc 8.3.2 requires numpy<2.1.0,>=2.0.0; python_version >= \"3.9\", but you have numpy 2.1.2 which is incompatible.\n", "spacy-transformers 1.3.5 requires transformers<4.37.0,>=3.4.0, but you have transformers 4.46.1 which is incompatible.\u001b[0m\u001b[31m\n", "\u001b[0mSuccessfully installed numpy-2.1.2\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } ], "source": [ "# Instalación de librerias:\n", "# Una vez instalada, comentar la celda de abajo\n", "#%pip install torch\n", "#%pip install transformers\n", "# Precaución: instalar primero torch y luego transformers (sino, no se instalara correctamente)\n", "# Actualizar librerías:\n", "#%pip install --upgrade numpy scipy scikit-learn\n", "#%pip uninstall transformers numpy scipy scikit-learn\n", "#%pip install transformers numpy scipy scikit-learn\n", "%pip install --force-reinstall numpy" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "\n", "A module that was compiled using NumPy 1.x cannot be run in\n", "NumPy 2.1.2 as it may crash. To support both 1.x and 2.x\n", "versions of NumPy, modules must be compiled with NumPy 2.0.\n", "Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.\n", "\n", "If you are a user of the module, the easiest solution will be to\n", "downgrade to 'numpy<2' or try to upgrade the affected module.\n", "We expect that some modules will need time to support NumPy 2.\n", "\n", "Traceback (most recent call last): File \"\", line 198, in _run_module_as_main\n", " File \"\", line 88, in _run_code\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/ipykernel_launcher.py\", line 17, in \n", " app.launch_new_instance()\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/traitlets/config/application.py\", line 992, in launch_instance\n", " app.start()\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/ipykernel/kernelapp.py\", line 711, in start\n", " self.io_loop.start()\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/tornado/platform/asyncio.py\", line 215, in start\n", " self.asyncio_loop.run_forever()\n", " File \"/home/jorgek/anaconda3/lib/python3.11/asyncio/base_events.py\", line 607, in run_forever\n", " self._run_once()\n", " File \"/home/jorgek/anaconda3/lib/python3.11/asyncio/base_events.py\", line 1922, in _run_once\n", " handle._run()\n", " File \"/home/jorgek/anaconda3/lib/python3.11/asyncio/events.py\", line 80, in _run\n", " self._context.run(self._callback, *self._args)\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/ipykernel/kernelbase.py\", line 510, in dispatch_queue\n", " await self.process_one()\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/ipykernel/kernelbase.py\", line 499, in process_one\n", " await dispatch(*args)\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/ipykernel/kernelbase.py\", line 406, in dispatch_shell\n", " await result\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/ipykernel/kernelbase.py\", line 729, in execute_request\n", " reply_content = await reply_content\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/ipykernel/ipkernel.py\", line 411, in do_execute\n", " res = shell.run_cell(\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/ipykernel/zmqshell.py\", line 531, in run_cell\n", " return super().run_cell(*args, **kwargs)\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/IPython/core/interactiveshell.py\", line 3006, in run_cell\n", " result = self._run_cell(\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/IPython/core/interactiveshell.py\", line 3061, in _run_cell\n", " result = runner(coro)\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/IPython/core/async_helpers.py\", line 129, in _pseudo_sync_runner\n", " coro.send(None)\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/IPython/core/interactiveshell.py\", line 3266, in run_cell_async\n", " has_raised = await self.run_ast_nodes(code_ast.body, cell_name,\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/IPython/core/interactiveshell.py\", line 3445, in run_ast_nodes\n", " if await self.run_code(code, result, async_=asy):\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/IPython/core/interactiveshell.py\", line 3505, in run_code\n", " exec(code_obj, self.user_global_ns, self.user_ns)\n", " File \"/tmp/ipykernel_40324/953355907.py\", line 3, in \n", " from transformers import pipeline\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/transformers/utils/import_utils.py\", line 1766, in __getattr__\n", " module = self._get_module(self._class_to_module[name])\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/transformers/utils/import_utils.py\", line 1778, in _get_module\n", " return importlib.import_module(\".\" + module_name, self.__name__)\n", " File \"/home/jorgek/anaconda3/lib/python3.11/importlib/__init__.py\", line 126, in import_module\n", " return _bootstrap._gcd_import(name[level:], package, level)\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/transformers/pipelines/__init__.py\", line 28, in \n", " from ..models.auto.feature_extraction_auto import FEATURE_EXTRACTOR_MAPPING, AutoFeatureExtractor\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/transformers/models/auto/feature_extraction_auto.py\", line 29, in \n", " from .auto_factory import _LazyAutoMapping\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py\", line 40, in \n", " from ...generation import GenerationMixin\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/transformers/utils/import_utils.py\", line 1766, in __getattr__\n", " module = self._get_module(self._class_to_module[name])\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/transformers/utils/import_utils.py\", line 1778, in _get_module\n", " return importlib.import_module(\".\" + module_name, self.__name__)\n", " File \"/home/jorgek/anaconda3/lib/python3.11/importlib/__init__.py\", line 126, in import_module\n", " return _bootstrap._gcd_import(name[level:], package, level)\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/transformers/generation/utils.py\", line 28, in \n", " from ..cache_utils import (\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/transformers/cache_utils.py\", line 1853, in \n", " class OffloadedStaticCache(StaticCache):\n", " File \"/home/jorgek/anaconda3/lib/python3.11/site-packages/transformers/cache_utils.py\", line 1918, in OffloadedStaticCache\n", " offload_device: Union[str, torch.device] = torch.device(\"cpu\"),\n", "/home/jorgek/anaconda3/lib/python3.11/site-packages/transformers/cache_utils.py:1918: UserWarning: Failed to initialize NumPy: _ARRAY_API not found (Triggered internally at /croot/pytorch_1686931851744/work/torch/csrc/utils/tensor_numpy.cpp:84.)\n", " offload_device: Union[str, torch.device] = torch.device(\"cpu\"),\n" ] }, { "ename": "RuntimeError", "evalue": "Failed to import transformers.pipelines because of the following error (look up to see its traceback):\nnumpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/transformers/utils/import_utils.py:1778\u001b[0m, in \u001b[0;36m_LazyModule._get_module\u001b[0;34m(self, module_name)\u001b[0m\n\u001b[1;32m 1777\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-> 1778\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m importlib\u001b[38;5;241m.\u001b[39mimport_module(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;241m+\u001b[39m module_name, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m)\n\u001b[1;32m 1779\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/importlib/__init__.py:126\u001b[0m, in \u001b[0;36mimport_module\u001b[0;34m(name, package)\u001b[0m\n\u001b[1;32m 125\u001b[0m level \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;241m1\u001b[39m\n\u001b[0;32m--> 126\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m _bootstrap\u001b[38;5;241m.\u001b[39m_gcd_import(name[level:], package, level)\n", "File \u001b[0;32m:1206\u001b[0m, in \u001b[0;36m_gcd_import\u001b[0;34m(name, package, level)\u001b[0m\n", "File \u001b[0;32m:1178\u001b[0m, in \u001b[0;36m_find_and_load\u001b[0;34m(name, import_)\u001b[0m\n", "File \u001b[0;32m:1149\u001b[0m, in \u001b[0;36m_find_and_load_unlocked\u001b[0;34m(name, import_)\u001b[0m\n", "File \u001b[0;32m:690\u001b[0m, in \u001b[0;36m_load_unlocked\u001b[0;34m(spec)\u001b[0m\n", "File \u001b[0;32m:940\u001b[0m, in \u001b[0;36mexec_module\u001b[0;34m(self, module)\u001b[0m\n", "File \u001b[0;32m:241\u001b[0m, in \u001b[0;36m_call_with_frames_removed\u001b[0;34m(f, *args, **kwds)\u001b[0m\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/transformers/pipelines/__init__.py:64\u001b[0m\n\u001b[1;32m 63\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdepth_estimation\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m DepthEstimationPipeline\n\u001b[0;32m---> 64\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdocument_question_answering\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m DocumentQuestionAnsweringPipeline\n\u001b[1;32m 65\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mfeature_extraction\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m FeatureExtractionPipeline\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/transformers/pipelines/document_question_answering.py:29\u001b[0m\n\u001b[1;32m 28\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mbase\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m ChunkPipeline, build_pipeline_init_args\n\u001b[0;32m---> 29\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mquestion_answering\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m select_starts_ends\n\u001b[1;32m 32\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m is_vision_available():\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/transformers/pipelines/question_answering.py:9\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mnumpy\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mnp\u001b[39;00m\n\u001b[0;32m----> 9\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdata\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m SquadExample, SquadFeatures, squad_convert_examples_to_features\n\u001b[1;32m 10\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mmodelcard\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m ModelCard\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/transformers/data/__init__.py:27\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdata_collator\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m (\n\u001b[1;32m 16\u001b[0m DataCollatorForLanguageModeling,\n\u001b[1;32m 17\u001b[0m DataCollatorForPermutationLanguageModeling,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 25\u001b[0m default_data_collator,\n\u001b[1;32m 26\u001b[0m )\n\u001b[0;32m---> 27\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mmetrics\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m glue_compute_metrics, xnli_compute_metrics\n\u001b[1;32m 28\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mprocessors\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m (\n\u001b[1;32m 29\u001b[0m DataProcessor,\n\u001b[1;32m 30\u001b[0m InputExample,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 44\u001b[0m xnli_tasks_num_labels,\n\u001b[1;32m 45\u001b[0m )\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/transformers/data/metrics/__init__.py:20\u001b[0m\n\u001b[1;32m 19\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mscipy\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mstats\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m pearsonr, spearmanr\n\u001b[0;32m---> 20\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msklearn\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mmetrics\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m f1_score, matthews_corrcoef\n\u001b[1;32m 23\u001b[0m DEPRECATION_WARNING \u001b[38;5;241m=\u001b[39m (\n\u001b[1;32m 24\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mThis metric will be removed from the library soon, metrics should be handled with the 🤗 Evaluate \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 25\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mlibrary. You can have a look at this example script for pointers: \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 26\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhttps://github.com/huggingface/transformers/blob/main/examples/pytorch/text-classification/run_glue.py\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 27\u001b[0m )\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/sklearn/__init__.py:84\u001b[0m\n\u001b[1;32m 80\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m (\n\u001b[1;32m 81\u001b[0m __check_build, \u001b[38;5;66;03m# noqa: F401\u001b[39;00m\n\u001b[1;32m 82\u001b[0m _distributor_init, \u001b[38;5;66;03m# noqa: F401\u001b[39;00m\n\u001b[1;32m 83\u001b[0m )\n\u001b[0;32m---> 84\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mbase\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m clone\n\u001b[1;32m 85\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutils\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_show_versions\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m show_versions\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/sklearn/base.py:19\u001b[0m\n\u001b[1;32m 18\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mexceptions\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m InconsistentVersionWarning\n\u001b[0;32m---> 19\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutils\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_estimator_html_repr\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m _HTMLDocumentationLinkMixin, estimator_html_repr\n\u001b[1;32m 20\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutils\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_metadata_requests\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m _MetadataRequester, _routing_enabled\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/sklearn/utils/__init__.py:11\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_bunch\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Bunch\n\u001b[0;32m---> 11\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_chunking\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m gen_batches, gen_even_slices\n\u001b[1;32m 12\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_estimator_html_repr\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m estimator_html_repr\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/sklearn/utils/_chunking.py:8\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_config\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m get_config\n\u001b[0;32m----> 8\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_param_validation\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Interval, validate_params\n\u001b[1;32m 11\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mchunk_generator\u001b[39m(gen, chunksize):\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/sklearn/utils/_param_validation.py:14\u001b[0m\n\u001b[1;32m 13\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_config\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m config_context, get_config\n\u001b[0;32m---> 14\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mvalidation\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m _is_arraylike_not_scalar\n\u001b[1;32m 17\u001b[0m \u001b[38;5;28;01mclass\u001b[39;00m \u001b[38;5;21;01mInvalidParameterError\u001b[39;00m(\u001b[38;5;167;01mValueError\u001b[39;00m, \u001b[38;5;167;01mTypeError\u001b[39;00m):\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py:26\u001b[0m\n\u001b[1;32m 25\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mexceptions\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m DataConversionWarning, NotFittedError, PositiveSpectrumWarning\n\u001b[0;32m---> 26\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutils\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_array_api\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m _asarray_with_order, _is_numpy_namespace, get_namespace\n\u001b[1;32m 27\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutils\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mfixes\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m ComplexWarning, _preserve_dia_indices_dtype\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/sklearn/utils/_array_api.py:11\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_config\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m get_config\n\u001b[0;32m---> 11\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mfixes\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m parse_version\n\u001b[1;32m 13\u001b[0m _NUMPY_NAMESPACE_NAMES \u001b[38;5;241m=\u001b[39m {\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnumpy\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124marray_api_compat.numpy\u001b[39m\u001b[38;5;124m\"\u001b[39m}\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/sklearn/utils/fixes.py:24\u001b[0m\n\u001b[1;32m 23\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m---> 24\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mpd\u001b[39;00m\n\u001b[1;32m 25\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mImportError\u001b[39;00m:\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/pandas/__init__.py:22\u001b[0m\n\u001b[1;32m 21\u001b[0m \u001b[38;5;66;03m# numpy compat\u001b[39;00m\n\u001b[0;32m---> 22\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcompat\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m is_numpy_dev \u001b[38;5;28;01mas\u001b[39;00m _is_numpy_dev \u001b[38;5;66;03m# pyright: ignore # noqa:F401\u001b[39;00m\n\u001b[1;32m 24\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/pandas/compat/__init__.py:18\u001b[0m\n\u001b[1;32m 17\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_typing\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m F\n\u001b[0;32m---> 18\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcompat\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mnumpy\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m (\n\u001b[1;32m 19\u001b[0m is_numpy_dev,\n\u001b[1;32m 20\u001b[0m np_version_under1p21,\n\u001b[1;32m 21\u001b[0m )\n\u001b[1;32m 22\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcompat\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mpyarrow\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m (\n\u001b[1;32m 23\u001b[0m pa_version_under1p01,\n\u001b[1;32m 24\u001b[0m pa_version_under2p0,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 31\u001b[0m pa_version_under9p0,\n\u001b[1;32m 32\u001b[0m )\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/pandas/compat/numpy/__init__.py:4\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mnumpy\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mnp\u001b[39;00m\n\u001b[0;32m----> 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutil\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mversion\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Version\n\u001b[1;32m 6\u001b[0m \u001b[38;5;66;03m# numpy versioning\u001b[39;00m\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/pandas/util/__init__.py:2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# pyright: reportUnusedImport = false\u001b[39;00m\n\u001b[0;32m----> 2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutil\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_decorators\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m ( \u001b[38;5;66;03m# noqa:F401\u001b[39;00m\n\u001b[1;32m 3\u001b[0m Appender,\n\u001b[1;32m 4\u001b[0m Substitution,\n\u001b[1;32m 5\u001b[0m cache_readonly,\n\u001b[1;32m 6\u001b[0m )\n\u001b[1;32m 8\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcore\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutil\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mhashing\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m ( \u001b[38;5;66;03m# noqa:F401\u001b[39;00m\n\u001b[1;32m 9\u001b[0m hash_array,\n\u001b[1;32m 10\u001b[0m hash_pandas_object,\n\u001b[1;32m 11\u001b[0m )\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/pandas/util/_decorators.py:14\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mwarnings\u001b[39;00m\n\u001b[0;32m---> 14\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_libs\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mproperties\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m cache_readonly\n\u001b[1;32m 15\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_typing\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m (\n\u001b[1;32m 16\u001b[0m F,\n\u001b[1;32m 17\u001b[0m T,\n\u001b[1;32m 18\u001b[0m )\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/pandas/_libs/__init__.py:13\u001b[0m\n\u001b[1;32m 1\u001b[0m __all__ \u001b[38;5;241m=\u001b[39m [\n\u001b[1;32m 2\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mNaT\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 3\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mNaTType\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 9\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mInterval\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 10\u001b[0m ]\n\u001b[0;32m---> 13\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_libs\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01minterval\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Interval\n\u001b[1;32m 14\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_libs\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mtslibs\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m (\n\u001b[1;32m 15\u001b[0m NaT,\n\u001b[1;32m 16\u001b[0m NaTType,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 21\u001b[0m iNaT,\n\u001b[1;32m 22\u001b[0m )\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/pandas/_libs/interval.pyx:1\u001b[0m, in \u001b[0;36minit pandas._libs.interval\u001b[0;34m()\u001b[0m\n", "\u001b[0;31mValueError\u001b[0m: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject", "\nThe above exception was the direct cause of the following exception:\n", "\u001b[0;31mRuntimeError\u001b[0m Traceback (most recent call last)", "Cell \u001b[0;32mIn[1], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Importación de Librerias\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mtorch\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mtransformers\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m pipeline\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mpd\u001b[39;00m\n", "File \u001b[0;32m:1231\u001b[0m, in \u001b[0;36m_handle_fromlist\u001b[0;34m(module, fromlist, import_, recursive)\u001b[0m\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/transformers/utils/import_utils.py:1766\u001b[0m, in \u001b[0;36m_LazyModule.__getattr__\u001b[0;34m(self, name)\u001b[0m\n\u001b[1;32m 1764\u001b[0m value \u001b[38;5;241m=\u001b[39m Placeholder\n\u001b[1;32m 1765\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m name \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_class_to_module\u001b[38;5;241m.\u001b[39mkeys():\n\u001b[0;32m-> 1766\u001b[0m module \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_get_module(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_class_to_module[name])\n\u001b[1;32m 1767\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mgetattr\u001b[39m(module, name)\n\u001b[1;32m 1768\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m name \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_modules:\n", "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/transformers/utils/import_utils.py:1780\u001b[0m, in \u001b[0;36m_LazyModule._get_module\u001b[0;34m(self, module_name)\u001b[0m\n\u001b[1;32m 1778\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m importlib\u001b[38;5;241m.\u001b[39mimport_module(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;241m+\u001b[39m module_name, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m)\n\u001b[1;32m 1779\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[0;32m-> 1780\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\n\u001b[1;32m 1781\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mFailed to import \u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m.\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mmodule_name\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m because of the following error (look up to see its\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 1782\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m traceback):\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;132;01m{\u001b[39;00me\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 1783\u001b[0m ) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01me\u001b[39;00m\n", "\u001b[0;31mRuntimeError\u001b[0m: Failed to import transformers.pipelines because of the following error (look up to see its traceback):\nnumpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject" ] } ], "source": [ "# Importación de Librerias\n", "import torch\n", "from transformers import pipeline\n", "import pandas as pd" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 3. NLP con Transformers\n", "Debido a que en nuestro proyecto se hace uso intensivo principalmente de herramientas NLP, es en esta rama en la que nos enfocaremos, aunque no lo limitamos a esto.\n", "Los siguientes son algunos modelos NLP que pueden utilizarse:\n", "* \"sentiment-analysis\" \n", "* \"text-classification\" \n", "* \"text-generation\"\n", "* \"questions-and-answers\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Sentiment-analysis\n", "Dado un texto, se lo clasifica por la carga sentimental que trae. Esta puede ser: \"POSITIVE\", \"NEGARIVE\" o \"NEUTRAL\"." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Up: [{'label': 'POS', 'score': 0.9970971345901489}]\n", "Down: [{'label': 'NEG', 'score': 0.9993558526039124}]\n" ] } ], "source": [ "analizador = pipeline('sentiment-analysis', model='finiteautomata/beto-sentiment-analysis')\n", "textoUp=\"Estamos muy entusiasmados en probar cuán simplemente podemos hacer un modelo de sentiment-analysis\"\n", "textoDown=\"Siento mucha frustración cuando mis trabajos no resultan como se planearon\"\n", "resultadoUp = analizador(textoUp)\n", "resultadoDown = analizador(textoDown)\n", "print(\"Up: \",resultadoUp)\n", "print(\"Down:\",resultadoDown)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Text-Classification: Zero-Shot-classification\n", "Dado un texto, clasificación zero-shot es la tarea de clasificar clases nunca antes vistas durante el entrenamiento de un modelo." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " labels scores\n", "0 Educación 0.712244\n", "1 Deportes 0.108196\n", "2 Medicina 0.097565\n", "3 Biología 0.081995\n" ] } ], "source": [ "# El objeto pipeline\n", "clasificador_zero_shot = pipeline(\"zero-shot-classification\", model=\"Recognai/bert-base-spanish-wwm-cased-xnli\")\n", "\n", "# Implementación del modelo\n", "texto = \"Esta notebook es útil para la enseñanza de modelos de NLP de hugging Face\"\n", "etiquetas_candidatas = [\"Educación\", \"Deportes\", \"Medicina\",\"Biología\"]\n", "resultado = clasificador_zero_shot(texto, etiquetas_candidatas)\n", "\n", "# Presentación de resultados:\n", "dfResultado=pd.DataFrame()\n", "dfResultado['labels']=resultado['labels']\n", "dfResultado['scores']=resultado['scores']\n", "print(dfResultado) # Imprime la etiqueta con la puntuación más alta" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Text-generation:\n", "Dado un pequeño texto, se amplía el mismo siguiendo el sentido del texto inicial." ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "# Librerias especificas:\n", "from transformers import GPT2Tokenizer, GPT2LMHeadModel\n", "\n", "# Nombre del modelo\n", "nombre_del_modelo = \"datificate/gpt2-small-spanish\"\n", "# Tokenizar: El tokenizador se encargará de dividir el texto en tokens comprensibles para el modelo.\n", "tokenizador = GPT2Tokenizer.from_pretrained(nombre_del_modelo)\n", "\n", "# El modelo\n", "modelo = GPT2LMHeadModel.from_pretrained(nombre_del_modelo)\n", "\n", "# Entrada del modelo\n", "textoBase = \"la validez de una igualdad\"\n", "modelo.config.pad_token_id = modelo.config.eos_token_id\n", "input_ids = tokenizador.encode(textoBase, return_tensors=\"pt\")" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\jorge.kamlofsky\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\transformers\\generation\\utils.py:1201: UserWarning: You have modified the pretrained model configuration to control generation. This is a deprecated strategy to control generation and will be removed soon, in a future version. Please use a generation configuration file (see https://huggingface.co/docs/transformers/main_classes/text_generation)\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "texto base: la validez de una igualdad\n", "texto generado: la validez de una igualdad de derechos y obligaciones, y la libertad de expresión, que se encuentra en la Constitución de la República.\n", "\n", "El artículo 1 de la Constitución de la República de Colombia establece que:\n", "\n", "El artículo 1 de la Constitución de la República de Colombia establece que:\n", "\n", "El artículo 1 de la Constitución de la República de Colombia establece que:\n", "\n", "El artículo 1 de la Constitución de la República de Colombia establece que:\n", "\n", "El artículo 1 de la Constitución de la\n" ] } ], "source": [ "# La salida:\n", "resultado = modelo.generate(input_ids, max_length=100, num_return_sequences=1)\n", "texto_generado = tokenizador.decode(resultado[0], skip_special_tokens=True)\n", "print(\"texto base: \",textoBase)\n", "print(\"texto generado: \",texto_generado)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "En este ejemplo, max_length es la longitud máxima del texto generado, y num_return_sequences es el número de secuencias de texto que se desea generar." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Question-Answering\n", "Los modelos de question-answer pueden recuperar la respuesta a una pregunta de un texto dado, lo cual es útil para buscar una respuesta en un documento. Estos modelos buscan generar una respuesta que responda correctamente la pregunta a partir del contexto dado." ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Downloading (…)lve/main/config.json: 100%|██████████| 721/721 [00:00