{ "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": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "pHzbx3WTkGcl", "outputId": "2da56fff-5007-42d1-d924-4b0bc2ec08e6" }, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Collecting gradientai\n", " Downloading gradientai-1.11.0-py3-none-any.whl (375 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m375.5/375.5 kB\u001b[0m \u001b[31m4.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hCollecting aenum>=3.1.11 (from gradientai)\n", " Downloading aenum-3.1.15-py3-none-any.whl (137 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m137.6/137.6 kB\u001b[0m \u001b[31m11.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hCollecting pydantic<2.0.0,>=1.10.5 (from gradientai)\n", " Downloading pydantic-1.10.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.1/3.1 MB\u001b[0m \u001b[31m14.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hRequirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from gradientai) (2.8.2)\n", "Requirement already satisfied: urllib3>=1.25.3 in /usr/local/lib/python3.10/dist-packages (from gradientai) (2.0.7)\n", "Requirement already satisfied: typing-extensions>=4.2.0 in /usr/local/lib/python3.10/dist-packages (from pydantic<2.0.0,>=1.10.5->gradientai) (4.11.0)\n", "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.2->gradientai) (1.16.0)\n", "Installing collected packages: aenum, pydantic, gradientai\n", " Attempting uninstall: pydantic\n", " Found existing installation: pydantic 2.7.1\n", " Uninstalling pydantic-2.7.1:\n", " Successfully uninstalled pydantic-2.7.1\n", "Successfully installed aenum-3.1.15 gradientai-1.11.0 pydantic-1.10.15\n" ] } ], "source": [ "!pip install gradientai --upgrade" ] }, { "cell_type": "code", "source": [ "import os\n", "import pandas as pd\n", "os.environ['GRADIENT_WORKSPACE_ID']='9d0447f2-fcd4-4177-9145-9f019fd59f1e_workspace'\n", "os.environ['GRADIENT_ACCESS_TOKEN']='cPErsUMgadGMbzeq8z8W36eJn7UA0Uob'" ], "metadata": { "id": "XJfF9GXCkM1f" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "df = pd.read_csv(\"https://raw.githubusercontent.com/CS-5302/CS-5302-Project-Group-15/main/Datasets/testing/combined_df.csv\")\n", "df" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 424 }, "id": "1hAAan9ikNdE", "outputId": "b84b6caf-1bc0-4aca-b4f5-3cc47e17293b" }, "execution_count": null, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " prompts \\\n", "0 I have Fever, Fatigue, Difficulty Breathing. W... \n", "1 I have Cough, Fatigue. What disease do i have? \n", "2 I have Cough, Fatigue. What disease do i have? \n", "3 I have Fever, Cough, Difficulty Breathing. Wha... \n", "4 I have Fever, Cough, Difficulty Breathing. Wha... \n", "... ... \n", "1344 i have leg pain, neck pain, paresthesia, leg c... \n", "1345 i have nasal congestion, white discharge from ... \n", "1346 i have cough, white discharge from eye, dimini... \n", "1347 i have diminished hearing, headache, facial pa... \n", "1348 i have diminished hearing, facial pain. what d... \n", "\n", " results \n", "0 You have Influenza. \n", "1 You don't have a disease. \n", "2 You don't have a disease. \n", "3 You have Asthma. \n", "4 You have Asthma. \n", "... ... \n", "1344 you have spondylolisthesis. \n", "1345 you have conjunctivitis due to virus. \n", "1346 you have conjunctivitis due to virus. \n", "1347 you have open wound of the nose. \n", "1348 you have open wound of the nose. \n", "\n", "[1349 rows x 2 columns]" ], "text/html": [ "\n", "
| \n", " | prompts | \n", "results | \n", "
|---|---|---|
| 0 | \n", "I have Fever, Fatigue, Difficulty Breathing. W... | \n", "You have Influenza. | \n", "
| 1 | \n", "I have Cough, Fatigue. What disease do i have? | \n", "You don't have a disease. | \n", "
| 2 | \n", "I have Cough, Fatigue. What disease do i have? | \n", "You don't have a disease. | \n", "
| 3 | \n", "I have Fever, Cough, Difficulty Breathing. Wha... | \n", "You have Asthma. | \n", "
| 4 | \n", "I have Fever, Cough, Difficulty Breathing. Wha... | \n", "You have Asthma. | \n", "
| ... | \n", "... | \n", "... | \n", "
| 1344 | \n", "i have leg pain, neck pain, paresthesia, leg c... | \n", "you have spondylolisthesis. | \n", "
| 1345 | \n", "i have nasal congestion, white discharge from ... | \n", "you have conjunctivitis due to virus. | \n", "
| 1346 | \n", "i have cough, white discharge from eye, dimini... | \n", "you have conjunctivitis due to virus. | \n", "
| 1347 | \n", "i have diminished hearing, headache, facial pa... | \n", "you have open wound of the nose. | \n", "
| 1348 | \n", "i have diminished hearing, facial pain. what d... | \n", "you have open wound of the nose. | \n", "
1349 rows × 2 columns
\n", "