diff --git a/chatbot/custom_chatbot.ipynb b/chatbot/custom_chatbot.ipynb index 1e66464..0aca710 100644 --- a/chatbot/custom_chatbot.ipynb +++ b/chatbot/custom_chatbot.ipynb @@ -1,22 +1,8 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [] - }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - }, - "language_info": { - "name": "python" - } - }, "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 5, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -26,184 +12,309 @@ }, "outputs": [ { - "output_type": "stream", "name": "stdout", + "output_type": "stream", "text": [ - "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", - "Collecting gradio\n", - " Downloading gradio-3.21.0-py3-none-any.whl (15.8 MB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m15.8/15.8 MB\u001b[0m \u001b[31m23.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: markupsafe in /usr/local/lib/python3.9/dist-packages (from gradio) (2.1.2)\n", - "Collecting pydub\n", - " Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n", - "Collecting ffmpy\n", - " Downloading ffmpy-0.3.0.tar.gz (4.8 kB)\n", - " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - "Collecting mdit-py-plugins<=0.3.3\n", - " Downloading mdit_py_plugins-0.3.3-py3-none-any.whl (50 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.5/50.5 KB\u001b[0m \u001b[31m3.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: numpy in /usr/local/lib/python3.9/dist-packages (from gradio) (1.22.4)\n", - "Collecting orjson\n", - " Downloading orjson-3.8.7-cp39-cp39-manylinux_2_28_x86_64.whl (140 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m140.9/140.9 KB\u001b[0m \u001b[31m7.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: pillow in /usr/local/lib/python3.9/dist-packages (from gradio) (8.4.0)\n", - "Requirement already satisfied: jinja2 in /usr/local/lib/python3.9/dist-packages (from gradio) (3.1.2)\n", - "Collecting uvicorn\n", - " Downloading uvicorn-0.21.0-py3-none-any.whl (57 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m57.8/57.8 KB\u001b[0m \u001b[31m4.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting aiohttp\n", - " Downloading aiohttp-3.8.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.0/1.0 MB\u001b[0m \u001b[31m31.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting huggingface-hub>=0.13.0\n", - " Downloading huggingface_hub-0.13.2-py3-none-any.whl (199 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m199.2/199.2 KB\u001b[0m \u001b[31m16.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting httpx\n", - " Downloading httpx-0.23.3-py3-none-any.whl (71 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m71.5/71.5 KB\u001b[0m \u001b[31m4.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: typing-extensions in /usr/local/lib/python3.9/dist-packages (from gradio) (4.5.0)\n", - "Requirement already satisfied: requests in /usr/local/lib/python3.9/dist-packages (from gradio) (2.25.1)\n", - "Collecting python-multipart\n", - " Downloading python_multipart-0.0.6-py3-none-any.whl (45 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m45.7/45.7 KB\u001b[0m \u001b[31m3.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting aiofiles\n", - " Downloading aiofiles-23.1.0-py3-none-any.whl (14 kB)\n", - "Requirement already satisfied: altair>=4.2.0 in /usr/local/lib/python3.9/dist-packages (from gradio) (4.2.2)\n", - "Requirement already satisfied: pydantic in /usr/local/lib/python3.9/dist-packages (from gradio) (1.10.6)\n", - "Collecting markdown-it-py[linkify]>=2.0.0\n", - " Downloading markdown_it_py-2.2.0-py3-none-any.whl (84 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m84.5/84.5 KB\u001b[0m \u001b[31m6.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: pandas in /usr/local/lib/python3.9/dist-packages (from gradio) (1.4.4)\n", - "Requirement already satisfied: fsspec in /usr/local/lib/python3.9/dist-packages (from gradio) (2023.3.0)\n", - "Requirement already satisfied: matplotlib in /usr/local/lib/python3.9/dist-packages (from gradio) (3.5.3)\n", - "Requirement already satisfied: pyyaml in /usr/local/lib/python3.9/dist-packages (from gradio) (6.0)\n", - "Collecting fastapi\n", - " Downloading fastapi-0.94.1-py3-none-any.whl (56 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m56.4/56.4 KB\u001b[0m \u001b[31m3.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting websockets>=10.0\n", - " Downloading websockets-10.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (106 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m106.5/106.5 KB\u001b[0m \u001b[31m7.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: entrypoints in /usr/local/lib/python3.9/dist-packages (from altair>=4.2.0->gradio) (0.4)\n", - "Requirement already satisfied: toolz in /usr/local/lib/python3.9/dist-packages (from altair>=4.2.0->gradio) (0.12.0)\n", - "Requirement already satisfied: jsonschema>=3.0 in /usr/local/lib/python3.9/dist-packages (from altair>=4.2.0->gradio) (4.3.3)\n", - "Requirement already satisfied: filelock in /usr/local/lib/python3.9/dist-packages (from huggingface-hub>=0.13.0->gradio) (3.9.0)\n", - "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.9/dist-packages (from huggingface-hub>=0.13.0->gradio) (4.65.0)\n", - "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.9/dist-packages (from huggingface-hub>=0.13.0->gradio) (23.0)\n", - "Collecting mdurl~=0.1\n", - " Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)\n", - "Collecting linkify-it-py<3,>=1\n", - " Downloading linkify_it_py-2.0.0-py3-none-any.whl (19 kB)\n", - "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.9/dist-packages (from pandas->gradio) (2022.7.1)\n", - "Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.9/dist-packages (from pandas->gradio) (2.8.2)\n", - "Collecting charset-normalizer<4.0,>=2.0\n", - " Downloading charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (199 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m199.2/199.2 KB\u001b[0m \u001b[31m12.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.9/dist-packages (from aiohttp->gradio) (22.2.0)\n", - "Collecting aiosignal>=1.1.2\n", - " Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB)\n", - "Collecting async-timeout<5.0,>=4.0.0a3\n", - " Downloading async_timeout-4.0.2-py3-none-any.whl (5.8 kB)\n", - "Collecting yarl<2.0,>=1.0\n", - " Downloading yarl-1.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (264 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m264.6/264.6 KB\u001b[0m \u001b[31m11.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting multidict<7.0,>=4.5\n", - " Downloading multidict-6.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (114 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m114.2/114.2 KB\u001b[0m \u001b[31m6.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting frozenlist>=1.1.1\n", - " Downloading frozenlist-1.3.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (158 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m158.8/158.8 KB\u001b[0m \u001b[31m1.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting starlette<0.27.0,>=0.26.1\n", - " Downloading starlette-0.26.1-py3-none-any.whl (66 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m66.9/66.9 KB\u001b[0m \u001b[31m4.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: certifi in /usr/local/lib/python3.9/dist-packages (from httpx->gradio) (2022.12.7)\n", - "Collecting httpcore<0.17.0,>=0.15.0\n", - " Downloading httpcore-0.16.3-py3-none-any.whl (69 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m69.6/69.6 KB\u001b[0m \u001b[31m4.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting sniffio\n", - " Downloading sniffio-1.3.0-py3-none-any.whl (10 kB)\n", - "Collecting rfc3986[idna2008]<2,>=1.3\n", - " Downloading rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/local/lib/python3.9/dist-packages (from matplotlib->gradio) (3.0.9)\n", - "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.9/dist-packages (from matplotlib->gradio) (0.11.0)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.9/dist-packages (from matplotlib->gradio) (1.4.4)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.9/dist-packages (from matplotlib->gradio) (4.39.0)\n", - "Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.9/dist-packages (from requests->gradio) (2.10)\n", - "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.9/dist-packages (from requests->gradio) (1.26.15)\n", - "Requirement already satisfied: chardet<5,>=3.0.2 in /usr/local/lib/python3.9/dist-packages (from requests->gradio) (4.0.0)\n", - "Collecting h11>=0.8\n", - " Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 KB\u001b[0m \u001b[31m4.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: click>=7.0 in /usr/local/lib/python3.9/dist-packages (from uvicorn->gradio) (8.1.3)\n", - "Collecting anyio<5.0,>=3.0\n", - " Downloading anyio-3.6.2-py3-none-any.whl (80 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m80.6/80.6 KB\u001b[0m \u001b[31m5.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /usr/local/lib/python3.9/dist-packages (from jsonschema>=3.0->altair>=4.2.0->gradio) (0.19.3)\n", - "Collecting uc-micro-py\n", - " Downloading uc_micro_py-1.0.1-py3-none-any.whl (6.2 kB)\n", - "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.9/dist-packages (from python-dateutil>=2.8.1->pandas->gradio) (1.15.0)\n", + "Collecting gradioNote: you may need to restart the kernel to use updated packages.\n", + "\n", + " Using cached gradio-4.29.0-py3-none-any.whl (12.3 MB)\n", + "Collecting aiofiles<24.0,>=22.0 (from gradio)\n", + " Using cached aiofiles-23.2.1-py3-none-any.whl (15 kB)\n", + "Collecting altair<6.0,>=4.2.0 (from gradio)\n", + " Using cached altair-5.3.0-py3-none-any.whl (857 kB)\n", + "Collecting fastapi (from gradio)\n", + " Using cached fastapi-0.111.0-py3-none-any.whl (91 kB)\n", + "Collecting ffmpy (from gradio)\n", + " Using cached ffmpy-0.3.2.tar.gz (5.5 kB)\n", + " Installing build dependencies: started\n", + " Installing build dependencies: finished with status 'done'\n", + " Getting requirements to build wheel: started\n", + " Getting requirements to build wheel: finished with status 'done'\n", + " Preparing metadata (pyproject.toml): started\n", + " Preparing metadata (pyproject.toml): finished with status 'done'\n", + "Collecting gradio-client==0.16.1 (from gradio)\n", + " Using cached gradio_client-0.16.1-py3-none-any.whl (314 kB)\n", + "Collecting httpx>=0.24.1 (from gradio)\n", + " Using cached httpx-0.27.0-py3-none-any.whl (75 kB)\n", + "Collecting huggingface-hub>=0.19.3 (from gradio)\n", + " Using cached huggingface_hub-0.23.0-py3-none-any.whl (401 kB)\n", + "Collecting importlib-resources<7.0,>=1.3 (from gradio)\n", + " Using cached importlib_resources-6.4.0-py3-none-any.whl (38 kB)\n", + "Collecting jinja2<4.0 (from gradio)\n", + " Using cached jinja2-3.1.4-py3-none-any.whl (133 kB)\n", + "Collecting markupsafe~=2.0 (from gradio)\n", + " Downloading MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl (17 kB)\n", + "Collecting matplotlib~=3.0 (from gradio)\n", + " Downloading matplotlib-3.8.4-cp311-cp311-win_amd64.whl (7.7 MB)\n", + " 0.0/7.7 MB ? eta -:--:--\n", + " --- 0.6/7.7 MB 12.2 MB/s eta 0:00:01\n", + " ------------- 2.6/7.7 MB 28.1 MB/s eta 0:00:01\n", + " -------------------------- 5.1/7.7 MB 36.1 MB/s eta 0:00:01\n", + " ----------------------------------- 6.8/7.7 MB 39.6 MB/s eta 0:00:01\n", + " --------------------------------------- 7.6/7.7 MB 40.9 MB/s eta 0:00:01\n", + " ---------------------------------------- 7.7/7.7 MB 30.6 MB/s eta 0:00:00\n", + "Collecting numpy~=1.0 (from gradio)\n", + " Downloading numpy-1.26.4-cp311-cp311-win_amd64.whl (15.8 MB)\n", + " 0.0/15.8 MB ? eta -:--:--\n", + " ------ 2.7/15.8 MB 56.9 MB/s eta 0:00:01\n", + " ------------ 4.8/15.8 MB 44.0 MB/s eta 0:00:01\n", + " ----------------- 7.0/15.8 MB 40.5 MB/s eta 0:00:01\n", + " ---------------------- 9.0/15.8 MB 40.9 MB/s eta 0:00:01\n", + " --------------------------------- 13.4/15.8 MB 50.4 MB/s eta 0:00:01\n", + " -------------------------------------- 15.8/15.8 MB 72.6 MB/s eta 0:00:01\n", + " -------------------------------------- 15.8/15.8 MB 72.6 MB/s eta 0:00:01\n", + " --------------------------------------- 15.8/15.8 MB 43.7 MB/s eta 0:00:00\n", + "Collecting orjson~=3.0 (from gradio)\n", + " Downloading orjson-3.10.3-cp311-none-win_amd64.whl (138 kB)\n", + " 0.0/138.8 kB ? eta -:--:--\n", + " ---------------------------------------- 138.8/138.8 kB ? eta 0:00:00\n", + "Requirement already satisfied: packaging in c:\\users\\sinteprol\\appdata\\roaming\\python\\python311\\site-packages (from gradio) (24.0)\n", + "Collecting pandas<3.0,>=1.0 (from gradio)\n", + " Downloading pandas-2.2.2-cp311-cp311-win_amd64.whl (11.6 MB)\n", + " 0.0/11.6 MB ? eta -:--:--\n", + " ---------- 3.0/11.6 MB 96.1 MB/s eta 0:00:01\n", + " ------------------------ 7.0/11.6 MB 44.7 MB/s eta 0:00:01\n", + " ------------------------------------ 10.9/11.6 MB 50.4 MB/s eta 0:00:01\n", + " -------------------------------------- 11.6/11.6 MB 43.7 MB/s eta 0:00:01\n", + " -------------------------------------- 11.6/11.6 MB 43.7 MB/s eta 0:00:01\n", + " --------------------------------------- 11.6/11.6 MB 31.2 MB/s eta 0:00:00\n", + "Collecting pillow<11.0,>=8.0 (from gradio)\n", + " Downloading pillow-10.3.0-cp311-cp311-win_amd64.whl (2.5 MB)\n", + " 0.0/2.5 MB ? eta -:--:--\n", + " --------------------------------------- 2.5/2.5 MB 78.7 MB/s eta 0:00:01\n", + " ---------------------------------------- 2.5/2.5 MB 53.6 MB/s eta 0:00:00\n", + "Collecting pydantic>=2.0 (from gradio)\n", + " Using cached pydantic-2.7.1-py3-none-any.whl (409 kB)\n", + "Collecting pydub (from gradio)\n", + " Using cached pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n", + "Collecting python-multipart>=0.0.9 (from gradio)\n", + " Using cached python_multipart-0.0.9-py3-none-any.whl (22 kB)\n", + "Collecting pyyaml<7.0,>=5.0 (from gradio)\n", + " Downloading PyYAML-6.0.1-cp311-cp311-win_amd64.whl (144 kB)\n", + " 0.0/144.7 kB ? eta -:--:--\n", + " ---------------------------------------- 144.7/144.7 kB ? eta 0:00:00\n", + "Collecting ruff>=0.2.2 (from gradio)\n", + " Using cached ruff-0.4.3-py3-none-win_amd64.whl (8.4 MB)\n", + "Collecting semantic-version~=2.0 (from gradio)\n", + " Using cached semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)\n", + "Collecting tomlkit==0.12.0 (from gradio)\n", + " Using cached tomlkit-0.12.0-py3-none-any.whl (37 kB)\n", + "Collecting typer<1.0,>=0.12 (from gradio)\n", + " Using cached typer-0.12.3-py3-none-any.whl (47 kB)\n", + "Requirement already satisfied: typing-extensions~=4.0 in c:\\users\\sinteprol\\appdata\\roaming\\python\\python311\\site-packages (from gradio) (4.11.0)\n", + "Collecting urllib3~=2.0 (from gradio)\n", + " Using cached urllib3-2.2.1-py3-none-any.whl (121 kB)\n", + "Collecting uvicorn>=0.14.0 (from gradio)\n", + " Using cached uvicorn-0.29.0-py3-none-any.whl (60 kB)\n", + "Collecting fsspec (from gradio-client==0.16.1->gradio)\n", + " Using cached fsspec-2024.3.1-py3-none-any.whl (171 kB)\n", + "Collecting websockets<12.0,>=10.0 (from gradio-client==0.16.1->gradio)\n", + " Downloading websockets-11.0.3-cp311-cp311-win_amd64.whl (124 kB)\n", + " 0.0/124.7 kB ? eta -:--:--\n", + " --------------------------------------- 122.9/124.7 kB ? eta -:--:--\n", + " -------------------------------------- 124.7/124.7 kB 2.4 MB/s eta 0:00:00\n", + "Collecting jsonschema>=3.0 (from altair<6.0,>=4.2.0->gradio)\n", + " Using cached jsonschema-4.22.0-py3-none-any.whl (88 kB)\n", + "Collecting toolz (from altair<6.0,>=4.2.0->gradio)\n", + " Using cached toolz-0.12.1-py3-none-any.whl (56 kB)\n", + "Collecting anyio (from httpx>=0.24.1->gradio)\n", + " Using cached anyio-4.3.0-py3-none-any.whl (85 kB)\n", + "Collecting certifi (from httpx>=0.24.1->gradio)\n", + " Using cached certifi-2024.2.2-py3-none-any.whl (163 kB)\n", + "Collecting httpcore==1.* (from httpx>=0.24.1->gradio)\n", + " Using cached httpcore-1.0.5-py3-none-any.whl (77 kB)\n", + "Collecting idna (from httpx>=0.24.1->gradio)\n", + " Using cached idna-3.7-py3-none-any.whl (66 kB)\n", + "Collecting sniffio (from httpx>=0.24.1->gradio)\n", + " Using cached sniffio-1.3.1-py3-none-any.whl (10 kB)\n", + "Collecting h11<0.15,>=0.13 (from httpcore==1.*->httpx>=0.24.1->gradio)\n", + " Using cached h11-0.14.0-py3-none-any.whl (58 kB)\n", + "Collecting filelock (from huggingface-hub>=0.19.3->gradio)\n", + " Using cached filelock-3.14.0-py3-none-any.whl (12 kB)\n", + "Collecting requests (from huggingface-hub>=0.19.3->gradio)\n", + " Using cached requests-2.31.0-py3-none-any.whl (62 kB)\n", + "Collecting tqdm>=4.42.1 (from huggingface-hub>=0.19.3->gradio)\n", + " Using cached tqdm-4.66.4-py3-none-any.whl (78 kB)\n", + "Collecting contourpy>=1.0.1 (from matplotlib~=3.0->gradio)\n", + " Downloading contourpy-1.2.1-cp311-cp311-win_amd64.whl (188 kB)\n", + " 0.0/188.2 kB ? eta -:--:--\n", + " ---------------------------------------- 188.2/188.2 kB ? eta 0:00:00\n", + "Collecting cycler>=0.10 (from matplotlib~=3.0->gradio)\n", + " Using cached cycler-0.12.1-py3-none-any.whl (8.3 kB)\n", + "Collecting fonttools>=4.22.0 (from matplotlib~=3.0->gradio)\n", + " Downloading fonttools-4.51.0-cp311-cp311-win_amd64.whl (2.2 MB)\n", + " 0.0/2.2 MB ? eta -:--:--\n", + " --------------------------------------- 2.2/2.2 MB 144.7 MB/s eta 0:00:01\n", + " ---------------------------------------- 2.2/2.2 MB 47.3 MB/s eta 0:00:00\n", + "Collecting kiwisolver>=1.3.1 (from matplotlib~=3.0->gradio)\n", + " Downloading kiwisolver-1.4.5-cp311-cp311-win_amd64.whl (56 kB)\n", + " 0.0/56.1 kB ? eta -:--:--\n", + " ---------------------------------------- 56.1/56.1 kB ? eta 0:00:00\n", + "Collecting pyparsing>=2.3.1 (from matplotlib~=3.0->gradio)\n", + " Using cached pyparsing-3.1.2-py3-none-any.whl (103 kB)\n", + "Requirement already satisfied: python-dateutil>=2.7 in c:\\users\\sinteprol\\appdata\\roaming\\python\\python311\\site-packages (from matplotlib~=3.0->gradio) (2.9.0.post0)\n", + "Collecting pytz>=2020.1 (from pandas<3.0,>=1.0->gradio)\n", + " Using cached pytz-2024.1-py2.py3-none-any.whl (505 kB)\n", + "Collecting tzdata>=2022.7 (from pandas<3.0,>=1.0->gradio)\n", + " Using cached tzdata-2024.1-py2.py3-none-any.whl (345 kB)\n", + "Collecting annotated-types>=0.4.0 (from pydantic>=2.0->gradio)\n", + " Using cached annotated_types-0.6.0-py3-none-any.whl (12 kB)\n", + "Collecting pydantic-core==2.18.2 (from pydantic>=2.0->gradio)\n", + " Downloading pydantic_core-2.18.2-cp311-none-win_amd64.whl (1.9 MB)\n", + " 0.0/1.9 MB ? eta -:--:--\n", + " ---------------------------------------- 1.9/1.9 MB 61.5 MB/s eta 0:00:00\n", + "Collecting click>=8.0.0 (from typer<1.0,>=0.12->gradio)\n", + " Using cached click-8.1.7-py3-none-any.whl (97 kB)\n", + "Collecting shellingham>=1.3.0 (from typer<1.0,>=0.12->gradio)\n", + " Using cached shellingham-1.5.4-py2.py3-none-any.whl (9.8 kB)\n", + "Collecting rich>=10.11.0 (from typer<1.0,>=0.12->gradio)\n", + " Using cached rich-13.7.1-py3-none-any.whl (240 kB)\n", + "Collecting starlette<0.38.0,>=0.37.2 (from fastapi->gradio)\n", + " Using cached starlette-0.37.2-py3-none-any.whl (71 kB)\n", + "Collecting fastapi-cli>=0.0.2 (from fastapi->gradio)\n", + " Using cached fastapi_cli-0.0.2-py3-none-any.whl (9.1 kB)\n", + "Collecting ujson!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,>=4.0.1 (from fastapi->gradio)\n", + " Downloading ujson-5.9.0-cp311-cp311-win_amd64.whl (41 kB)\n", + " 0.0/41.9 kB ? eta -:--:--\n", + " ---------------------------------------- 41.9/41.9 kB ? eta 0:00:00\n", + "Collecting email_validator>=2.0.0 (from fastapi->gradio)\n", + " Using cached email_validator-2.1.1-py3-none-any.whl (30 kB)\n", + "Requirement already satisfied: colorama in c:\\users\\sinteprol\\appdata\\roaming\\python\\python311\\site-packages (from click>=8.0.0->typer<1.0,>=0.12->gradio) (0.4.6)\n", + "Collecting dnspython>=2.0.0 (from email_validator>=2.0.0->fastapi->gradio)\n", + " Using cached dnspython-2.6.1-py3-none-any.whl (307 kB)\n", + "Collecting attrs>=22.2.0 (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio)\n", + " Using cached attrs-23.2.0-py3-none-any.whl (60 kB)\n", + "Collecting jsonschema-specifications>=2023.03.6 (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio)\n", + " Using cached jsonschema_specifications-2023.12.1-py3-none-any.whl (18 kB)\n", + "Collecting referencing>=0.28.4 (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio)\n", + " Using cached referencing-0.35.1-py3-none-any.whl (26 kB)\n", + "Collecting rpds-py>=0.7.1 (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio)\n", + " Downloading rpds_py-0.18.1-cp311-none-win_amd64.whl (209 kB)\n", + " 0.0/209.0 kB ? eta -:--:--\n", + " ---------------------------------------- 209.0/209.0 kB ? eta 0:00:00\n", + "Requirement already satisfied: six>=1.5 in c:\\users\\sinteprol\\appdata\\roaming\\python\\python311\\site-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio) (1.16.0)\n", + "Collecting markdown-it-py>=2.2.0 (from rich>=10.11.0->typer<1.0,>=0.12->gradio)\n", + " Using cached markdown_it_py-3.0.0-py3-none-any.whl (87 kB)\n", + "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in c:\\users\\sinteprol\\appdata\\roaming\\python\\python311\\site-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (2.18.0)\n", + "Collecting httptools>=0.5.0 (from uvicorn>=0.14.0->gradio)\n", + " Downloading httptools-0.6.1-cp311-cp311-win_amd64.whl (55 kB)\n", + " 0.0/55.4 kB ? eta -:--:--\n", + " ---------------------------------------- 55.4/55.4 kB ? eta 0:00:00\n", + "Collecting python-dotenv>=0.13 (from uvicorn>=0.14.0->gradio)\n", + " Using cached python_dotenv-1.0.1-py3-none-any.whl (19 kB)\n", + "Collecting watchfiles>=0.13 (from uvicorn>=0.14.0->gradio)\n", + " Downloading watchfiles-0.21.0-cp311-none-win_amd64.whl (280 kB)\n", + " 0.0/280.1 kB ? eta -:--:--\n", + " ---------------------------------------- 280.1/280.1 kB ? eta 0:00:00\n", + "Collecting charset-normalizer<4,>=2 (from requests->huggingface-hub>=0.19.3->gradio)\n", + " Downloading charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl (99 kB)\n", + " 0.0/99.9 kB ? eta -:--:--\n", + " ---------------------------------------- 99.9/99.9 kB ? eta 0:00:00\n", + "Collecting mdurl~=0.1 (from markdown-it-py>=2.2.0->rich>=10.11.0->typer<1.0,>=0.12->gradio)\n", + " Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB)\n", "Building wheels for collected packages: ffmpy\n", - " Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - " Created wheel for ffmpy: filename=ffmpy-0.3.0-py3-none-any.whl size=4707 sha256=90f5e273b49f2020b901ac465f6ac81e2e5ef0d7ed45c0650853f7431b3f4384\n", - " Stored in directory: /root/.cache/pip/wheels/91/e2/96/f676aa08bfd789328c6576cd0f1fde4a3d686703bb0c247697\n", + " Building wheel for ffmpy (pyproject.toml): started\n", + " Building wheel for ffmpy (pyproject.toml): finished with status 'done'\n", + " Created wheel for ffmpy: filename=ffmpy-0.3.2-py3-none-any.whl size=5607 sha256=637d46ca4a963a4a444d14b02cd3acea952156e2bb10b42c6016fc190538f6cc\n", + " Stored in directory: c:\\users\\sinteprol\\appdata\\local\\pip\\cache\\wheels\\55\\3c\\f2\\f6e34046bac0d57c13c7d08123b85872423b89c8f59bafda51\n", "Successfully built ffmpy\n", - "Installing collected packages: rfc3986, pydub, ffmpy, websockets, uc-micro-py, sniffio, python-multipart, orjson, multidict, mdurl, h11, frozenlist, charset-normalizer, async-timeout, aiofiles, yarl, uvicorn, markdown-it-py, linkify-it-py, huggingface-hub, anyio, aiosignal, starlette, mdit-py-plugins, httpcore, aiohttp, httpx, fastapi, gradio\n", - "Successfully installed aiofiles-23.1.0 aiohttp-3.8.4 aiosignal-1.3.1 anyio-3.6.2 async-timeout-4.0.2 charset-normalizer-3.1.0 fastapi-0.94.1 ffmpy-0.3.0 frozenlist-1.3.3 gradio-3.21.0 h11-0.14.0 httpcore-0.16.3 httpx-0.23.3 huggingface-hub-0.13.2 linkify-it-py-2.0.0 markdown-it-py-2.2.0 mdit-py-plugins-0.3.3 mdurl-0.1.2 multidict-6.0.4 orjson-3.8.7 pydub-0.25.1 python-multipart-0.0.6 rfc3986-1.5.0 sniffio-1.3.0 starlette-0.26.1 uc-micro-py-1.0.1 uvicorn-0.21.0 websockets-10.4 yarl-1.8.2\n", - "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", - "Collecting openai\n", - " Downloading openai-0.27.2-py3-none-any.whl (70 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m70.1/70.1 KB\u001b[0m \u001b[31m8.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: aiohttp in /usr/local/lib/python3.9/dist-packages (from openai) (3.8.4)\n", - "Requirement already satisfied: tqdm in /usr/local/lib/python3.9/dist-packages (from openai) (4.65.0)\n", - "Requirement already satisfied: requests>=2.20 in /usr/local/lib/python3.9/dist-packages (from openai) (2.25.1)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.9/dist-packages (from requests>=2.20->openai) (2022.12.7)\n", - "Requirement already satisfied: chardet<5,>=3.0.2 in /usr/local/lib/python3.9/dist-packages (from requests>=2.20->openai) (4.0.0)\n", - "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.9/dist-packages (from requests>=2.20->openai) (1.26.15)\n", - "Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.9/dist-packages (from requests>=2.20->openai) (2.10)\n", - "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.9/dist-packages (from aiohttp->openai) (6.0.4)\n", - "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.9/dist-packages (from aiohttp->openai) (1.3.1)\n", - "Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /usr/local/lib/python3.9/dist-packages (from aiohttp->openai) (3.1.0)\n", - "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.9/dist-packages (from aiohttp->openai) (1.3.3)\n", - "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.9/dist-packages (from aiohttp->openai) (1.8.2)\n", - "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.9/dist-packages (from aiohttp->openai) (22.2.0)\n", - "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.9/dist-packages (from aiohttp->openai) (4.0.2)\n", - "Installing collected packages: openai\n", - "Successfully installed openai-0.27.2\n" + "Installing collected packages: pytz, pydub, ffmpy, websockets, urllib3, ujson, tzdata, tqdm, toolz, tomlkit, sniffio, shellingham, semantic-version, ruff, rpds-py, pyyaml, python-multipart, python-dotenv, pyparsing, pydantic-core, pillow, orjson, numpy, mdurl, markupsafe, kiwisolver, importlib-resources, idna, httptools, h11, fsspec, fonttools, filelock, dnspython, cycler, click, charset-normalizer, certifi, attrs, annotated-types, aiofiles, uvicorn, requests, referencing, pydantic, pandas, markdown-it-py, jinja2, httpcore, email_validator, contourpy, anyio, watchfiles, starlette, rich, matplotlib, jsonschema-specifications, huggingface-hub, httpx, typer, jsonschema, gradio-client, altair, fastapi-cli, fastapi, gradio\n", + "Successfully installed aiofiles-23.2.1 altair-5.3.0 annotated-types-0.6.0 anyio-4.3.0 attrs-23.2.0 certifi-2024.2.2 charset-normalizer-3.3.2 click-8.1.7 contourpy-1.2.1 cycler-0.12.1 dnspython-2.6.1 email_validator-2.1.1 fastapi-0.111.0 fastapi-cli-0.0.2 ffmpy-0.3.2 filelock-3.14.0 fonttools-4.51.0 fsspec-2024.3.1 gradio-4.29.0 gradio-client-0.16.1 h11-0.14.0 httpcore-1.0.5 httptools-0.6.1 httpx-0.27.0 huggingface-hub-0.23.0 idna-3.7 importlib-resources-6.4.0 jinja2-3.1.4 jsonschema-4.22.0 jsonschema-specifications-2023.12.1 kiwisolver-1.4.5 markdown-it-py-3.0.0 markupsafe-2.1.5 matplotlib-3.8.4 mdurl-0.1.2 numpy-1.26.4 orjson-3.10.3 pandas-2.2.2 pillow-10.3.0 pydantic-2.7.1 pydantic-core-2.18.2 pydub-0.25.1 pyparsing-3.1.2 python-dotenv-1.0.1 python-multipart-0.0.9 pytz-2024.1 pyyaml-6.0.1 referencing-0.35.1 requests-2.31.0 rich-13.7.1 rpds-py-0.18.1 ruff-0.4.3 semantic-version-2.10.0 shellingham-1.5.4 sniffio-1.3.1 starlette-0.37.2 tomlkit-0.12.0 toolz-0.12.1 tqdm-4.66.4 typer-0.12.3 tzdata-2024.1 ujson-5.9.0 urllib3-2.2.1 uvicorn-0.29.0 watchfiles-0.21.0 websockets-11.0.3\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + " WARNING: The script tqdm.exe is installed in 'c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + " WARNING: The script dotenv.exe is installed in 'c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + " WARNING: The script f2py.exe is installed in 'c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + " WARNING: The scripts fonttools.exe, pyftmerge.exe, pyftsubset.exe and ttx.exe are installed in 'c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + " WARNING: The script normalizer.exe is installed in 'c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + " WARNING: The script uvicorn.exe is installed in 'c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + " WARNING: The script markdown-it.exe is installed in 'c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + " WARNING: The script email_validator.exe is installed in 'c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + " WARNING: The script watchfiles.exe is installed in 'c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + " WARNING: The script huggingface-cli.exe is installed in 'c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + " WARNING: The script httpx.exe is installed in 'c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + " WARNING: The script typer.exe is installed in 'c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + " WARNING: The script jsonschema.exe is installed in 'c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + " WARNING: The script fastapi.exe is installed in 'c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + " WARNING: The scripts gradio.exe and upload_theme.exe are installed in 'c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + "\n", + "[notice] A new release of pip is available: 23.1.2 -> 24.0\n", + "[notice] To update, run: python.exe -m pip install --upgrade pip\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collecting openaiNote: you may need to restart the kernel to use updated packages.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + " WARNING: The script distro.exe is installed in 'c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + " WARNING: The script openai.exe is installed in 'c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + "\n", + "[notice] A new release of pip is available: 23.1.2 -> 24.0\n", + "[notice] To update, run: python.exe -m pip install --upgrade pip\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Using cached openai-1.25.2-py3-none-any.whl (312 kB)\n", + "Requirement already satisfied: anyio<5,>=3.5.0 in c:\\users\\sinteprol\\appdata\\local\\programs\\python\\python311\\lib\\site-packages (from openai) (4.3.0)\n", + "Collecting distro<2,>=1.7.0 (from openai)\n", + " Using cached distro-1.9.0-py3-none-any.whl (20 kB)\n", + "Requirement already satisfied: httpx<1,>=0.23.0 in c:\\users\\sinteprol\\appdata\\local\\programs\\python\\python311\\lib\\site-packages (from openai) (0.27.0)\n", + "Requirement already satisfied: pydantic<3,>=1.9.0 in c:\\users\\sinteprol\\appdata\\local\\programs\\python\\python311\\lib\\site-packages (from openai) (2.7.1)\n", + "Requirement already satisfied: sniffio in c:\\users\\sinteprol\\appdata\\local\\programs\\python\\python311\\lib\\site-packages (from openai) (1.3.1)\n", + "Requirement already satisfied: tqdm>4 in c:\\users\\sinteprol\\appdata\\local\\programs\\python\\python311\\lib\\site-packages (from openai) (4.66.4)\n", + "Requirement already satisfied: typing-extensions<5,>=4.7 in c:\\users\\sinteprol\\appdata\\roaming\\python\\python311\\site-packages (from openai) (4.11.0)\n", + "Requirement already satisfied: idna>=2.8 in c:\\users\\sinteprol\\appdata\\local\\programs\\python\\python311\\lib\\site-packages (from anyio<5,>=3.5.0->openai) (3.7)\n", + "Requirement already satisfied: certifi in c:\\users\\sinteprol\\appdata\\local\\programs\\python\\python311\\lib\\site-packages (from httpx<1,>=0.23.0->openai) (2024.2.2)\n", + "Requirement already satisfied: httpcore==1.* in c:\\users\\sinteprol\\appdata\\local\\programs\\python\\python311\\lib\\site-packages (from httpx<1,>=0.23.0->openai) (1.0.5)\n", + "Requirement already satisfied: h11<0.15,>=0.13 in c:\\users\\sinteprol\\appdata\\local\\programs\\python\\python311\\lib\\site-packages (from httpcore==1.*->httpx<1,>=0.23.0->openai) (0.14.0)\n", + "Requirement already satisfied: annotated-types>=0.4.0 in c:\\users\\sinteprol\\appdata\\local\\programs\\python\\python311\\lib\\site-packages (from pydantic<3,>=1.9.0->openai) (0.6.0)\n", + "Requirement already satisfied: pydantic-core==2.18.2 in c:\\users\\sinteprol\\appdata\\local\\programs\\python\\python311\\lib\\site-packages (from pydantic<3,>=1.9.0->openai) (2.18.2)\n", + "Requirement already satisfied: colorama in c:\\users\\sinteprol\\appdata\\roaming\\python\\python311\\site-packages (from tqdm>4->openai) (0.4.6)\n", + "Installing collected packages: distro, openai\n", + "Successfully installed distro-1.9.0 openai-1.25.2\n" ] } ], "source": [ - "!pip install gradio \n", - "!pip install openai" + "%pip install gradio \n", + "%pip install openai" ] }, { "cell_type": "code", - "source": [ - "import openai\n", - "import gradio as gr\n", - "\n", - "openai.api_key = \"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\"\n", - "\n", - "messages = [\n", - " {\"role\": \"system\", \"content\": \"You are a helpful and kind AI Assistant.\"},\n", - "]\n", - "\n", - "def chatbot(input):\n", - " if input:\n", - " messages.append({\"role\": \"user\", \"content\": input})\n", - " chat = openai.ChatCompletion.create(\n", - " model=\"gpt-3.5-turbo\", messages=messages\n", - " )\n", - " reply = chat.choices[0].message.content\n", - " messages.append({\"role\": \"assistant\", \"content\": reply})\n", - " return reply\n", - "\n", - "inputs = gr.inputs.Textbox(lines=7, label=\"Chat with AI\")\n", - "outputs = gr.outputs.Textbox(label=\"Reply\")\n", - "\n", - "gr.Interface(fn=chatbot, inputs=inputs, outputs=outputs, title=\"ChatGPT : Meow!\",\n", - " description=\"Ask anything you want\",\n", - " theme=\"compact\").launch(share=True)" - ], + "execution_count": 12, "metadata": { "colab": { "base_uri": "https://localhost:8080/", @@ -212,55 +323,125 @@ "id": "N-2_3d7yRPUG", "outputId": "0476915f-132a-434d-ef0b-d7bff7cbe35d" }, - "execution_count": 3, "outputs": [ { - "output_type": "stream", "name": "stderr", + "output_type": "stream", "text": [ - "/usr/local/lib/python3.9/dist-packages/gradio/inputs.py:27: UserWarning: Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components\n", - " warnings.warn(\n", - "/usr/local/lib/python3.9/dist-packages/gradio/deprecation.py:40: UserWarning: `optional` parameter is deprecated, and it has no effect\n", - " warnings.warn(value)\n", - "/usr/local/lib/python3.9/dist-packages/gradio/deprecation.py:40: UserWarning: `numeric` parameter is deprecated, and it has no effect\n", - " warnings.warn(value)\n", - "/usr/local/lib/python3.9/dist-packages/gradio/outputs.py:22: UserWarning: Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components\n", - " warnings.warn(\n", - "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py:491: UserWarning: Theme should be a class loaded from gradio.themes\n", - " warnings.warn(\"Theme should be a class loaded from gradio.themes\")\n" + "c:\\Users\\Sinteprol\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\gradio\\blocks.py:736: UserWarning: Cannot load compact. Caught Exception: 404 Client Error: Not Found for url: https://huggingface.co/api/spaces/compact (Request ID: Root=1-663907c9-048fba380a98a7fd5a9e9b33;0a63854a-f8d0-4d5f-b816-d38f5fe89e89)\n", + "\n", + "Sorry, we can't find the page you are looking for.\n", + " warnings.warn(f\"Cannot load {theme}. Caught Exception: {str(e)}\")\n" ] }, { - "output_type": "stream", "name": "stdout", + "output_type": "stream", "text": [ - "Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n", - "Running on public URL: https://f1db95da9dc280303b.gradio.live\n", + "Running on local URL: http://127.0.0.1:7863\n", "\n", - "This share link expires in 72 hours. For free permanent hosting and GPU upgrades (NEW!), check out Spaces: https://huggingface.co/spaces\n" + "Could not create share link. Please check your internet connection or our status page: https://status.gradio.app.\n" ] }, { - "output_type": "display_data", "data": { + "text/html": [ + "
" + ], "text/plain": [ "