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
+
"nbformat": 4,
|
| 3 |
+
"nbformat_minor": 0,
|
| 4 |
+
"metadata": {
|
| 5 |
+
"colab": {
|
| 6 |
+
"provenance": []
|
| 7 |
+
},
|
| 8 |
+
"kernelspec": {
|
| 9 |
+
"name": "python3",
|
| 10 |
+
"display_name": "Python 3"
|
| 11 |
+
},
|
| 12 |
+
"language_info": {
|
| 13 |
+
"name": "python"
|
| 14 |
+
}
|
| 15 |
+
},
|
| 16 |
+
"cells": [
|
| 17 |
+
{
|
| 18 |
+
"cell_type": "code",
|
| 19 |
+
"source": [
|
| 20 |
+
"pip install groq"
|
| 21 |
+
],
|
| 22 |
+
"metadata": {
|
| 23 |
+
"id": "WVeN8pltcw-Z"
|
| 24 |
+
},
|
| 25 |
+
"execution_count": null,
|
| 26 |
+
"outputs": []
|
| 27 |
+
},
|
| 28 |
+
{
|
| 29 |
+
"cell_type": "code",
|
| 30 |
+
"source": [
|
| 31 |
+
"pip install gradio"
|
| 32 |
+
],
|
| 33 |
+
"metadata": {
|
| 34 |
+
"colab": {
|
| 35 |
+
"base_uri": "https://localhost:8080/"
|
| 36 |
+
},
|
| 37 |
+
"id": "wo0uk8aSC7Fy",
|
| 38 |
+
"outputId": "8e38a9c8-d66c-4a8d-cb27-2f71811be694"
|
| 39 |
+
},
|
| 40 |
+
"execution_count": 18,
|
| 41 |
+
"outputs": [
|
| 42 |
+
{
|
| 43 |
+
"output_type": "stream",
|
| 44 |
+
"name": "stdout",
|
| 45 |
+
"text": [
|
| 46 |
+
"Collecting gradio\n",
|
| 47 |
+
" Downloading gradio-4.39.0-py3-none-any.whl.metadata (15 kB)\n",
|
| 48 |
+
"Collecting aiofiles<24.0,>=22.0 (from gradio)\n",
|
| 49 |
+
" Downloading aiofiles-23.2.1-py3-none-any.whl.metadata (9.7 kB)\n",
|
| 50 |
+
"Requirement already satisfied: anyio<5.0,>=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.7.1)\n",
|
| 51 |
+
"Collecting fastapi (from gradio)\n",
|
| 52 |
+
" Downloading fastapi-0.111.1-py3-none-any.whl.metadata (26 kB)\n",
|
| 53 |
+
"Collecting ffmpy (from gradio)\n",
|
| 54 |
+
" Downloading ffmpy-0.3.2.tar.gz (5.5 kB)\n",
|
| 55 |
+
" Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
|
| 56 |
+
"Collecting gradio-client==1.1.1 (from gradio)\n",
|
| 57 |
+
" Downloading gradio_client-1.1.1-py3-none-any.whl.metadata (7.1 kB)\n",
|
| 58 |
+
"Requirement already satisfied: httpx>=0.24.1 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.27.0)\n",
|
| 59 |
+
"Requirement already satisfied: huggingface-hub>=0.19.3 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.23.5)\n",
|
| 60 |
+
"Requirement already satisfied: importlib-resources<7.0,>=1.3 in /usr/local/lib/python3.10/dist-packages (from gradio) (6.4.0)\n",
|
| 61 |
+
"Requirement already satisfied: jinja2<4.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.1.4)\n",
|
| 62 |
+
"Requirement already satisfied: markupsafe~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.1.5)\n",
|
| 63 |
+
"Requirement already satisfied: matplotlib~=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.7.1)\n",
|
| 64 |
+
"Requirement already satisfied: numpy<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (1.25.2)\n",
|
| 65 |
+
"Collecting orjson~=3.0 (from gradio)\n",
|
| 66 |
+
" Downloading orjson-3.10.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (50 kB)\n",
|
| 67 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.4/50.4 kB\u001b[0m \u001b[31m2.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 68 |
+
"\u001b[?25hRequirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from gradio) (24.1)\n",
|
| 69 |
+
"Requirement already satisfied: pandas<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.0.3)\n",
|
| 70 |
+
"Requirement already satisfied: pillow<11.0,>=8.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (9.4.0)\n",
|
| 71 |
+
"Requirement already satisfied: pydantic>=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.8.2)\n",
|
| 72 |
+
"Collecting pydub (from gradio)\n",
|
| 73 |
+
" Downloading pydub-0.25.1-py2.py3-none-any.whl.metadata (1.4 kB)\n",
|
| 74 |
+
"Collecting python-multipart>=0.0.9 (from gradio)\n",
|
| 75 |
+
" Downloading python_multipart-0.0.9-py3-none-any.whl.metadata (2.5 kB)\n",
|
| 76 |
+
"Requirement already satisfied: pyyaml<7.0,>=5.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (6.0.1)\n",
|
| 77 |
+
"Collecting ruff>=0.2.2 (from gradio)\n",
|
| 78 |
+
" Downloading ruff-0.5.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (24 kB)\n",
|
| 79 |
+
"Collecting semantic-version~=2.0 (from gradio)\n",
|
| 80 |
+
" Downloading semantic_version-2.10.0-py2.py3-none-any.whl.metadata (9.7 kB)\n",
|
| 81 |
+
"Collecting tomlkit==0.12.0 (from gradio)\n",
|
| 82 |
+
" Downloading tomlkit-0.12.0-py3-none-any.whl.metadata (2.7 kB)\n",
|
| 83 |
+
"Requirement already satisfied: typer<1.0,>=0.12 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.12.3)\n",
|
| 84 |
+
"Requirement already satisfied: typing-extensions~=4.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (4.12.2)\n",
|
| 85 |
+
"Requirement already satisfied: urllib3~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.0.7)\n",
|
| 86 |
+
"Collecting uvicorn>=0.14.0 (from gradio)\n",
|
| 87 |
+
" Downloading uvicorn-0.30.3-py3-none-any.whl.metadata (6.5 kB)\n",
|
| 88 |
+
"Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from gradio-client==1.1.1->gradio) (2023.6.0)\n",
|
| 89 |
+
"Collecting websockets<12.0,>=10.0 (from gradio-client==1.1.1->gradio)\n",
|
| 90 |
+
" Downloading websockets-11.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.6 kB)\n",
|
| 91 |
+
"Requirement already satisfied: idna>=2.8 in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->gradio) (3.7)\n",
|
| 92 |
+
"Requirement already satisfied: sniffio>=1.1 in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->gradio) (1.3.1)\n",
|
| 93 |
+
"Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->gradio) (1.2.2)\n",
|
| 94 |
+
"Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx>=0.24.1->gradio) (2024.7.4)\n",
|
| 95 |
+
"Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.10/dist-packages (from httpx>=0.24.1->gradio) (1.0.5)\n",
|
| 96 |
+
"Requirement already satisfied: h11<0.15,>=0.13 in /usr/local/lib/python3.10/dist-packages (from httpcore==1.*->httpx>=0.24.1->gradio) (0.14.0)\n",
|
| 97 |
+
"Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.3->gradio) (3.15.4)\n",
|
| 98 |
+
"Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.3->gradio) (2.31.0)\n",
|
| 99 |
+
"Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.3->gradio) (4.66.4)\n",
|
| 100 |
+
"Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (1.2.1)\n",
|
| 101 |
+
"Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (0.12.1)\n",
|
| 102 |
+
"Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (4.53.1)\n",
|
| 103 |
+
"Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (1.4.5)\n",
|
| 104 |
+
"Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (3.1.2)\n",
|
| 105 |
+
"Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (2.8.2)\n",
|
| 106 |
+
"Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio) (2023.4)\n",
|
| 107 |
+
"Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio) (2024.1)\n",
|
| 108 |
+
"Requirement already satisfied: annotated-types>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pydantic>=2.0->gradio) (0.7.0)\n",
|
| 109 |
+
"Requirement already satisfied: pydantic-core==2.20.1 in /usr/local/lib/python3.10/dist-packages (from pydantic>=2.0->gradio) (2.20.1)\n",
|
| 110 |
+
"Requirement already satisfied: click>=8.0.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0,>=0.12->gradio) (8.1.7)\n",
|
| 111 |
+
"Requirement already satisfied: shellingham>=1.3.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0,>=0.12->gradio) (1.5.4)\n",
|
| 112 |
+
"Requirement already satisfied: rich>=10.11.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0,>=0.12->gradio) (13.7.1)\n",
|
| 113 |
+
"Collecting starlette<0.38.0,>=0.37.2 (from fastapi->gradio)\n",
|
| 114 |
+
" Downloading starlette-0.37.2-py3-none-any.whl.metadata (5.9 kB)\n",
|
| 115 |
+
"Collecting fastapi-cli>=0.0.2 (from fastapi->gradio)\n",
|
| 116 |
+
" Downloading fastapi_cli-0.0.4-py3-none-any.whl.metadata (7.0 kB)\n",
|
| 117 |
+
"Collecting email_validator>=2.0.0 (from fastapi->gradio)\n",
|
| 118 |
+
" Downloading email_validator-2.2.0-py3-none-any.whl.metadata (25 kB)\n",
|
| 119 |
+
"Collecting dnspython>=2.0.0 (from email_validator>=2.0.0->fastapi->gradio)\n",
|
| 120 |
+
" Downloading dnspython-2.6.1-py3-none-any.whl.metadata (5.8 kB)\n",
|
| 121 |
+
"Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio) (1.16.0)\n",
|
| 122 |
+
"Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.10/dist-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (3.0.0)\n",
|
| 123 |
+
"Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.10/dist-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (2.16.1)\n",
|
| 124 |
+
"Collecting httptools>=0.5.0 (from uvicorn[standard]>=0.12.0->fastapi->gradio)\n",
|
| 125 |
+
" Downloading httptools-0.6.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.6 kB)\n",
|
| 126 |
+
"Collecting python-dotenv>=0.13 (from uvicorn[standard]>=0.12.0->fastapi->gradio)\n",
|
| 127 |
+
" Downloading python_dotenv-1.0.1-py3-none-any.whl.metadata (23 kB)\n",
|
| 128 |
+
"Collecting uvloop!=0.15.0,!=0.15.1,>=0.14.0 (from uvicorn[standard]>=0.12.0->fastapi->gradio)\n",
|
| 129 |
+
" Downloading uvloop-0.19.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.9 kB)\n",
|
| 130 |
+
"Collecting watchfiles>=0.13 (from uvicorn[standard]>=0.12.0->fastapi->gradio)\n",
|
| 131 |
+
" Downloading watchfiles-0.22.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.9 kB)\n",
|
| 132 |
+
"Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.19.3->gradio) (3.3.2)\n",
|
| 133 |
+
"Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py>=2.2.0->rich>=10.11.0->typer<1.0,>=0.12->gradio) (0.1.2)\n",
|
| 134 |
+
"Downloading gradio-4.39.0-py3-none-any.whl (12.4 MB)\n",
|
| 135 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.4/12.4 MB\u001b[0m \u001b[31m60.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 136 |
+
"\u001b[?25hDownloading gradio_client-1.1.1-py3-none-any.whl (318 kB)\n",
|
| 137 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m318.2/318.2 kB\u001b[0m \u001b[31m19.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 138 |
+
"\u001b[?25hDownloading tomlkit-0.12.0-py3-none-any.whl (37 kB)\n",
|
| 139 |
+
"Downloading aiofiles-23.2.1-py3-none-any.whl (15 kB)\n",
|
| 140 |
+
"Downloading orjson-3.10.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (141 kB)\n",
|
| 141 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m141.1/141.1 kB\u001b[0m \u001b[31m9.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 142 |
+
"\u001b[?25hDownloading python_multipart-0.0.9-py3-none-any.whl (22 kB)\n",
|
| 143 |
+
"Downloading ruff-0.5.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.1 MB)\n",
|
| 144 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m10.1/10.1 MB\u001b[0m \u001b[31m58.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 145 |
+
"\u001b[?25hDownloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)\n",
|
| 146 |
+
"Downloading uvicorn-0.30.3-py3-none-any.whl (62 kB)\n",
|
| 147 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.8/62.8 kB\u001b[0m \u001b[31m3.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 148 |
+
"\u001b[?25hDownloading fastapi-0.111.1-py3-none-any.whl (92 kB)\n",
|
| 149 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m92.2/92.2 kB\u001b[0m \u001b[31m6.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 150 |
+
"\u001b[?25hDownloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
|
| 151 |
+
"Downloading email_validator-2.2.0-py3-none-any.whl (33 kB)\n",
|
| 152 |
+
"Downloading fastapi_cli-0.0.4-py3-none-any.whl (9.5 kB)\n",
|
| 153 |
+
"Downloading starlette-0.37.2-py3-none-any.whl (71 kB)\n",
|
| 154 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m71.9/71.9 kB\u001b[0m \u001b[31m4.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 155 |
+
"\u001b[?25hDownloading websockets-11.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (129 kB)\n",
|
| 156 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m129.9/129.9 kB\u001b[0m \u001b[31m8.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 157 |
+
"\u001b[?25hDownloading dnspython-2.6.1-py3-none-any.whl (307 kB)\n",
|
| 158 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m307.7/307.7 kB\u001b[0m \u001b[31m15.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 159 |
+
"\u001b[?25hDownloading httptools-0.6.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (341 kB)\n",
|
| 160 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m341.4/341.4 kB\u001b[0m \u001b[31m17.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 161 |
+
"\u001b[?25hDownloading python_dotenv-1.0.1-py3-none-any.whl (19 kB)\n",
|
| 162 |
+
"Downloading uvloop-0.19.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB)\n",
|
| 163 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.4/3.4 MB\u001b[0m \u001b[31m65.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 164 |
+
"\u001b[?25hDownloading watchfiles-0.22.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB)\n",
|
| 165 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.2/1.2 MB\u001b[0m \u001b[31m46.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 166 |
+
"\u001b[?25hBuilding wheels for collected packages: ffmpy\n",
|
| 167 |
+
" Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
|
| 168 |
+
" Created wheel for ffmpy: filename=ffmpy-0.3.2-py3-none-any.whl size=5584 sha256=91b0bfa585839b19908aa23eedc43978b6f7679aa350b43cb81d33433ddab0d3\n",
|
| 169 |
+
" Stored in directory: /root/.cache/pip/wheels/bd/65/9a/671fc6dcde07d4418df0c592f8df512b26d7a0029c2a23dd81\n",
|
| 170 |
+
"Successfully built ffmpy\n",
|
| 171 |
+
"Installing collected packages: pydub, ffmpy, websockets, uvloop, uvicorn, tomlkit, semantic-version, ruff, python-multipart, python-dotenv, orjson, httptools, dnspython, aiofiles, watchfiles, starlette, email_validator, gradio-client, fastapi-cli, fastapi, gradio\n",
|
| 172 |
+
"Successfully installed aiofiles-23.2.1 dnspython-2.6.1 email_validator-2.2.0 fastapi-0.111.1 fastapi-cli-0.0.4 ffmpy-0.3.2 gradio-4.39.0 gradio-client-1.1.1 httptools-0.6.1 orjson-3.10.6 pydub-0.25.1 python-dotenv-1.0.1 python-multipart-0.0.9 ruff-0.5.4 semantic-version-2.10.0 starlette-0.37.2 tomlkit-0.12.0 uvicorn-0.30.3 uvloop-0.19.0 watchfiles-0.22.0 websockets-11.0.3\n"
|
| 173 |
+
]
|
| 174 |
+
}
|
| 175 |
+
]
|
| 176 |
+
},
|
| 177 |
+
{
|
| 178 |
+
"cell_type": "code",
|
| 179 |
+
"execution_count": 22,
|
| 180 |
+
"metadata": {
|
| 181 |
+
"colab": {
|
| 182 |
+
"base_uri": "https://localhost:8080/",
|
| 183 |
+
"height": 211
|
| 184 |
+
},
|
| 185 |
+
"id": "zeBQLQB_COtN",
|
| 186 |
+
"outputId": "4b452f92-7682-4284-eaef-295dc71366ac"
|
| 187 |
+
},
|
| 188 |
+
"outputs": [
|
| 189 |
+
{
|
| 190 |
+
"output_type": "error",
|
| 191 |
+
"ename": "AttributeError",
|
| 192 |
+
"evalue": "'Stream' object has no attribute 'update'",
|
| 193 |
+
"traceback": [
|
| 194 |
+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 195 |
+
"\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
|
| 196 |
+
"\u001b[0;32m<ipython-input-22-27e072912bb2>\u001b[0m in \u001b[0;36m<cell line: 35>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 33\u001b[0m \u001b[0minput\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0mchunk\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mchoices\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdelta\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcontent\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0;34m\"\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 34\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 35\u001b[0;31m completion.update(\n\u001b[0m\u001b[1;32m 36\u001b[0m messages=[\n\u001b[1;32m 37\u001b[0m {\n",
|
| 197 |
+
"\u001b[0;31mAttributeError\u001b[0m: 'Stream' object has no attribute 'update'"
|
| 198 |
+
]
|
| 199 |
+
}
|
| 200 |
+
],
|
| 201 |
+
"source": [
|
| 202 |
+
"from groq import Groq\n",
|
| 203 |
+
"import gradio as gr\n",
|
| 204 |
+
"\n",
|
| 205 |
+
"client = Groq(\n",
|
| 206 |
+
" api_key= \"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\"\n",
|
| 207 |
+
")\n",
|
| 208 |
+
"\n",
|
| 209 |
+
"completion = client.chat.completions.create(\n",
|
| 210 |
+
" model=\"llama-3.1-70b-versatile\",\n",
|
| 211 |
+
" messages=[\n",
|
| 212 |
+
" {\n",
|
| 213 |
+
" \"role\": \"user\",\n",
|
| 214 |
+
" \"content\": \"Start a Trivia on Nigeria music. Assess the answer and provide the percentage score\"\n",
|
| 215 |
+
" },\n",
|
| 216 |
+
" {\n",
|
| 217 |
+
" \"role\": \"assistant\",\n",
|
| 218 |
+
" \"content\": \"\"\n",
|
| 219 |
+
" },\n",
|
| 220 |
+
" {\n",
|
| 221 |
+
" \"role\": \"assistant\",\n",
|
| 222 |
+
" \"content\": \"Here's your first question:\\n\\n**Question 1:** Who is the Nigerian artiste known as the \\\"King of Afrobeat\\\"?\\n\\nA) Fela Kuti\\nB) King Sunny Adé\\nC) Eddy Okonta\\nD) Victor Uwaifo\\n\\nLet me know your answer!\\n\\n(I'll keep track of your scores and provide feedback on your responses.)\\n\\nType your answer!\"\n",
|
| 223 |
+
" }\n",
|
| 224 |
+
" ],\n",
|
| 225 |
+
" temperature=1,\n",
|
| 226 |
+
" max_tokens=1024,\n",
|
| 227 |
+
" top_p=1,\n",
|
| 228 |
+
" stream=True,\n",
|
| 229 |
+
" stop=None,\n",
|
| 230 |
+
")\n",
|
| 231 |
+
"\n",
|
| 232 |
+
"for chunk in completion:\n",
|
| 233 |
+
" print(chunk.choices[0].delta.content or \"\", end=\"\")\n"
|
| 234 |
+
]
|
| 235 |
+
},
|
| 236 |
+
{
|
| 237 |
+
"cell_type": "code",
|
| 238 |
+
"source": [
|
| 239 |
+
"from groq import Groq\n",
|
| 240 |
+
"import gradio as gr\n",
|
| 241 |
+
"\n",
|
| 242 |
+
"# Initialize the Groq client with your API key\n",
|
| 243 |
+
"client = Groq(\n",
|
| 244 |
+
" api_key=\"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\"\n",
|
| 245 |
+
")\n",
|
| 246 |
+
"\n",
|
| 247 |
+
"# List to maintain the conversation history\n",
|
| 248 |
+
"conversation_history = [\n",
|
| 249 |
+
" {\"role\": \"system\", \"content\": \"You are an assistant in a trivia game focused on Nigerian music.\"}\n",
|
| 250 |
+
"]\n",
|
| 251 |
+
"\n",
|
| 252 |
+
"# Function to get the LLM output and update the conversation history\n",
|
| 253 |
+
"def trivia_game(user_response):\n",
|
| 254 |
+
" # Add user's response to the conversation history\n",
|
| 255 |
+
" conversation_history.append({\"role\": \"user\", \"content\": user_response})\n",
|
| 256 |
+
"\n",
|
| 257 |
+
" # Get completion from the LLM\n",
|
| 258 |
+
" completion = client.chat.completions.create(\n",
|
| 259 |
+
" model=\"llama-3.1-70b-versatile\",\n",
|
| 260 |
+
" messages=conversation_history,\n",
|
| 261 |
+
" temperature=1,\n",
|
| 262 |
+
" max_tokens=1024,\n",
|
| 263 |
+
" top_p=1,\n",
|
| 264 |
+
" stream=True,\n",
|
| 265 |
+
" stop=None,\n",
|
| 266 |
+
" )\n",
|
| 267 |
+
"\n",
|
| 268 |
+
" llm_output = \"\"\n",
|
| 269 |
+
" for chunk in completion:\n",
|
| 270 |
+
" llm_output += chunk.choices[0].delta.content or \"\"\n",
|
| 271 |
+
"\n",
|
| 272 |
+
" # Add the assistant's response to the conversation history\n",
|
| 273 |
+
" conversation_history.append({\"role\": \"assistant\", \"content\": llm_output})\n",
|
| 274 |
+
"\n",
|
| 275 |
+
" return llm_output\n",
|
| 276 |
+
"\n",
|
| 277 |
+
"# Creating Gradio Interface\n",
|
| 278 |
+
"llm_output = gr.Textbox(label=\"LLM Output\", placeholder=\"The output from the LLM will appear here\", lines=10)\n",
|
| 279 |
+
"user_response = gr.Textbox(label=\"Your Response\", placeholder=\"Type your response here\", lines=3)\n",
|
| 280 |
+
"\n",
|
| 281 |
+
"demo = gr.Interface(\n",
|
| 282 |
+
" fn=trivia_game,\n",
|
| 283 |
+
" inputs=user_response,\n",
|
| 284 |
+
" outputs=llm_output,\n",
|
| 285 |
+
" title=\"Trivia Game\",\n",
|
| 286 |
+
" description=\"A simple trivia game using Groq's LLama 3 LLM API\"\n",
|
| 287 |
+
")\n",
|
| 288 |
+
"\n",
|
| 289 |
+
"# Starting the Gradio app\n",
|
| 290 |
+
"demo.launch()\n",
|
| 291 |
+
"\n"
|
| 292 |
+
],
|
| 293 |
+
"metadata": {
|
| 294 |
+
"colab": {
|
| 295 |
+
"base_uri": "https://localhost:8080/",
|
| 296 |
+
"height": 646
|
| 297 |
+
},
|
| 298 |
+
"id": "M9Uz7BJ6NOkO",
|
| 299 |
+
"outputId": "6aa70fee-3bf7-46b7-e232-393e8352e5af"
|
| 300 |
+
},
|
| 301 |
+
"execution_count": 33,
|
| 302 |
+
"outputs": [
|
| 303 |
+
{
|
| 304 |
+
"output_type": "stream",
|
| 305 |
+
"name": "stdout",
|
| 306 |
+
"text": [
|
| 307 |
+
"Setting queue=True in a Colab notebook requires sharing enabled. Setting `share=True` (you can turn this off by setting `share=False` in `launch()` explicitly).\n",
|
| 308 |
+
"\n",
|
| 309 |
+
"Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n",
|
| 310 |
+
"Running on public URL: https://f24a7676e50f0183bd.gradio.live\n",
|
| 311 |
+
"\n",
|
| 312 |
+
"This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)\n"
|
| 313 |
+
]
|
| 314 |
+
},
|
| 315 |
+
{
|
| 316 |
+
"output_type": "display_data",
|
| 317 |
+
"data": {
|
| 318 |
+
"text/plain": [
|
| 319 |
+
"<IPython.core.display.HTML object>"
|
| 320 |
+
],
|
| 321 |
+
"text/html": [
|
| 322 |
+
"<div><iframe src=\"https://f24a7676e50f0183bd.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
|
| 323 |
+
]
|
| 324 |
+
},
|
| 325 |
+
"metadata": {}
|
| 326 |
+
},
|
| 327 |
+
{
|
| 328 |
+
"output_type": "execute_result",
|
| 329 |
+
"data": {
|
| 330 |
+
"text/plain": []
|
| 331 |
+
},
|
| 332 |
+
"metadata": {},
|
| 333 |
+
"execution_count": 33
|
| 334 |
+
}
|
| 335 |
+
]
|
| 336 |
+
},
|
| 337 |
+
{
|
| 338 |
+
"cell_type": "code",
|
| 339 |
+
"source": [
|
| 340 |
+
"from groq import Groq\n",
|
| 341 |
+
"import gradio as gr\n",
|
| 342 |
+
"\n",
|
| 343 |
+
"# Initialize the Groq client with your API key\n",
|
| 344 |
+
"client = Groq(\n",
|
| 345 |
+
" api_key=\"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\"\n",
|
| 346 |
+
")\n",
|
| 347 |
+
"\n",
|
| 348 |
+
"# List to maintain the conversation history, starting with a default prompt\n",
|
| 349 |
+
"conversation_history = [\n",
|
| 350 |
+
" {\"role\": \"system\", \"content\": \"You are an assistant in a trivia game focused on Nigerian music.\"}\n",
|
| 351 |
+
"]\n",
|
| 352 |
+
"\n",
|
| 353 |
+
"# Function to get the initial LLM output and start the conversation\n",
|
| 354 |
+
"def start_trivia_game():\n",
|
| 355 |
+
" # Initial message to start the game\n",
|
| 356 |
+
" initial_message = \"Start a Trivia on Nigeria music. Assess the answer and provide the percentage score\"\n",
|
| 357 |
+
"\n",
|
| 358 |
+
" # Add the initial message to the conversation history\n",
|
| 359 |
+
" conversation_history.append({\"role\": \"user\", \"content\": initial_message})\n",
|
| 360 |
+
"\n",
|
| 361 |
+
" # Get completion from the LLM for the initial question\n",
|
| 362 |
+
" completion = client.chat.completions.create(\n",
|
| 363 |
+
" model=\"llama-3.1-70b-versatile\",\n",
|
| 364 |
+
" messages=conversation_history,\n",
|
| 365 |
+
" temperature=1,\n",
|
| 366 |
+
" max_tokens=1024,\n",
|
| 367 |
+
" top_p=1,\n",
|
| 368 |
+
" stream=True,\n",
|
| 369 |
+
" stop=None,\n",
|
| 370 |
+
" )\n",
|
| 371 |
+
"\n",
|
| 372 |
+
" llm_output = \"\"\n",
|
| 373 |
+
" for chunk in completion:\n",
|
| 374 |
+
" llm_output += chunk.choices[0].delta.content or \"\"\n",
|
| 375 |
+
"\n",
|
| 376 |
+
" # Add the assistant's response to the conversation history\n",
|
| 377 |
+
" conversation_history.append({\"role\": \"assistant\", \"content\": llm_output})\n",
|
| 378 |
+
"\n",
|
| 379 |
+
" return llm_output\n",
|
| 380 |
+
"\n",
|
| 381 |
+
"# Function to handle user response and continue the conversation\n",
|
| 382 |
+
"def continue_trivia_game(user_response):\n",
|
| 383 |
+
" # Add user's response to the conversation history\n",
|
| 384 |
+
" conversation_history.append({\"role\": \"user\", \"content\": user_response})\n",
|
| 385 |
+
"\n",
|
| 386 |
+
" # Get completion from the LLM for the user's response\n",
|
| 387 |
+
" completion = client.chat.completions.create(\n",
|
| 388 |
+
" model=\"llama-3.1-70b-versatile\",\n",
|
| 389 |
+
" messages=conversation_history,\n",
|
| 390 |
+
" temperature=1,\n",
|
| 391 |
+
" max_tokens=1024,\n",
|
| 392 |
+
" top_p=1,\n",
|
| 393 |
+
" stream=True,\n",
|
| 394 |
+
" stop=None,\n",
|
| 395 |
+
" )\n",
|
| 396 |
+
"\n",
|
| 397 |
+
" llm_output = \"\"\n",
|
| 398 |
+
" for chunk in completion:\n",
|
| 399 |
+
" llm_output += chunk.choices[0].delta.content or \"\"\n",
|
| 400 |
+
"\n",
|
| 401 |
+
" # Add the assistant's response to the conversation history\n",
|
| 402 |
+
" conversation_history.append({\"role\": \"assistant\", \"content\": llm_output})\n",
|
| 403 |
+
"\n",
|
| 404 |
+
" return llm_output\n",
|
| 405 |
+
"\n",
|
| 406 |
+
"# Start the game and get the initial LLM output\n",
|
| 407 |
+
"initial_output = start_trivia_game()\n",
|
| 408 |
+
"\n",
|
| 409 |
+
"# Creating Gradio Interface\n",
|
| 410 |
+
"llm_output = gr.Textbox(label=\"LLM Output\", placeholder=\"The output from the LLM will appear here\", lines=10, value=initial_output)\n",
|
| 411 |
+
"user_response = gr.Textbox(label=\"Your Response\", placeholder=\"Type your response here\", lines=3)\n",
|
| 412 |
+
"\n",
|
| 413 |
+
"demo = gr.Interface(\n",
|
| 414 |
+
" fn=continue_trivia_game,\n",
|
| 415 |
+
" inputs=user_response,\n",
|
| 416 |
+
" outputs=llm_output,\n",
|
| 417 |
+
" title=\"TriviaVilla--Nigerian Music Trivia Game\",\n",
|
| 418 |
+
" description=\"How much do you know Nigerian Music? Here is a simple trivia game on Nigerian Music using LLama 3.1\",\n",
|
| 419 |
+
")\n",
|
| 420 |
+
"\n",
|
| 421 |
+
"# Starting the Gradio app\n",
|
| 422 |
+
"demo.launch()\n",
|
| 423 |
+
"\n"
|
| 424 |
+
],
|
| 425 |
+
"metadata": {
|
| 426 |
+
"colab": {
|
| 427 |
+
"base_uri": "https://localhost:8080/",
|
| 428 |
+
"height": 646
|
| 429 |
+
},
|
| 430 |
+
"id": "dUpGIo3eHT6t",
|
| 431 |
+
"outputId": "a56d0ca1-43ad-4092-d756-24b01ec9ae58"
|
| 432 |
+
},
|
| 433 |
+
"execution_count": 35,
|
| 434 |
+
"outputs": [
|
| 435 |
+
{
|
| 436 |
+
"output_type": "stream",
|
| 437 |
+
"name": "stdout",
|
| 438 |
+
"text": [
|
| 439 |
+
"Setting queue=True in a Colab notebook requires sharing enabled. Setting `share=True` (you can turn this off by setting `share=False` in `launch()` explicitly).\n",
|
| 440 |
+
"\n",
|
| 441 |
+
"Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n",
|
| 442 |
+
"Running on public URL: https://0d7874273562a8d25f.gradio.live\n",
|
| 443 |
+
"\n",
|
| 444 |
+
"This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)\n"
|
| 445 |
+
]
|
| 446 |
+
},
|
| 447 |
+
{
|
| 448 |
+
"output_type": "display_data",
|
| 449 |
+
"data": {
|
| 450 |
+
"text/plain": [
|
| 451 |
+
"<IPython.core.display.HTML object>"
|
| 452 |
+
],
|
| 453 |
+
"text/html": [
|
| 454 |
+
"<div><iframe src=\"https://0d7874273562a8d25f.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
|
| 455 |
+
]
|
| 456 |
+
},
|
| 457 |
+
"metadata": {}
|
| 458 |
+
},
|
| 459 |
+
{
|
| 460 |
+
"output_type": "execute_result",
|
| 461 |
+
"data": {
|
| 462 |
+
"text/plain": []
|
| 463 |
+
},
|
| 464 |
+
"metadata": {},
|
| 465 |
+
"execution_count": 35
|
| 466 |
+
}
|
| 467 |
+
]
|
| 468 |
+
},
|
| 469 |
+
{
|
| 470 |
+
"cell_type": "code",
|
| 471 |
+
"source": [],
|
| 472 |
+
"metadata": {
|
| 473 |
+
"colab": {
|
| 474 |
+
"base_uri": "https://localhost:8080/",
|
| 475 |
+
"height": 106
|
| 476 |
+
},
|
| 477 |
+
"id": "U1vMYZkFDYgh",
|
| 478 |
+
"outputId": "66ef485d-d9c8-4949-91da-f4620b3a03da"
|
| 479 |
+
},
|
| 480 |
+
"execution_count": 6,
|
| 481 |
+
"outputs": [
|
| 482 |
+
{
|
| 483 |
+
"output_type": "error",
|
| 484 |
+
"ename": "SyntaxError",
|
| 485 |
+
"evalue": "invalid syntax (<ipython-input-6-45df297f8215>, line 1)",
|
| 486 |
+
"traceback": [
|
| 487 |
+
"\u001b[0;36m File \u001b[0;32m\"<ipython-input-6-45df297f8215>\"\u001b[0;36m, line \u001b[0;32m1\u001b[0m\n\u001b[0;31m export Groq_API_KEY= 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\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
|
| 488 |
+
]
|
| 489 |
+
}
|
| 490 |
+
]
|
| 491 |
+
}
|
| 492 |
+
]
|
| 493 |
+
}
|