{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Access token is needed for reading this data (contact Lavita's admin: pedram@lavita.ai)" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from datasets import load_dataset" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# Reading data from Lavita's Hugging Face\n", "\n", "# data_hf_name = \"lavita/ChatDoctor-HealthCareMagic-100k\"\n", "data_hf_name = \"lavita/ChatDoctor-iCliniq\"\n", "dataset = load_dataset(data_hf_name)\n", "\n", "# Converting data to pandas DataFrame\n", "df = dataset['train'].to_pandas()" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
inputanswer_icliniqanswer_chatgptanswer_chatdoctor
0Hello doctor,I had mumps five months ago and a...Hello, Welcome to Chat Doctor forum. I can und...It is possible that you still have an infectio...1) There is no need to worry about reinfection...
1Hello doctor,I am trying to conceive but my hu...Hello, Wellcome to ChatDoctor. There are few r...Hello! Thank you for reaching out.\\n\\nCocaine ...1) Cocaine use can affect fertility by causing...
2Hello doctor,I am currently on the Yaz contrac...Hello. The brown discharge should be temporary...Hello! It's not uncommon to experience some ir...1) The brown discharge is due to the hormonal ...
3Hello doctor,My son aged 13 years has got his ...Hello, Welcome to Chat Doctor forum. I have go...As an AI language model, I am not a doctor and...Hi, welcome to Chat Doctor forum. I understand...
4Hello doctor,I just got one side of my wisdom ...Hello. The lump is mostly a hard swelling whic...Hello,\\n\\nIt is normal to have some swelling a...Hi, Thanks for your query. It appears that you...
5Hello doctor,I had deep unprotected sex for th...Hi. Firstly, I want to tell you that the tests...Hello,\\n\\nI understand your concern about poss...Hi, welcome to Chat Doctor forum. As your sex ...
6Hello doctor,I need advice after my second CT ...Hi. According to guidelines when there is a si...Hello,\\n\\nBased on your CT results, it appears...1) The nodules are probably benign and unlikel...
7Hi doctor,I had sex for the first time. After ...Hello. As the serum beta hCG levels are less t...There are many possible reasons for late perio...1. The delay in periods is usually due to stre...
8Hello doctor,My friend aged 30 had two drops o...Hi. I want to assure you not to worry as every...I'm sorry to hear about your friend's situatio...1. The side effects of phenol include irritati...
9Hello doctor,Some mornings during the week I g...Hello. I understand your concern and would ex...Hello! It's difficult to give a definitive dia...Hi, Welcome to Chat Doctor forum. The symptoms...
\n", "
" ], "text/plain": [ " input \\\n", "0 Hello doctor,I had mumps five months ago and a... \n", "1 Hello doctor,I am trying to conceive but my hu... \n", "2 Hello doctor,I am currently on the Yaz contrac... \n", "3 Hello doctor,My son aged 13 years has got his ... \n", "4 Hello doctor,I just got one side of my wisdom ... \n", "5 Hello doctor,I had deep unprotected sex for th... \n", "6 Hello doctor,I need advice after my second CT ... \n", "7 Hi doctor,I had sex for the first time. After ... \n", "8 Hello doctor,My friend aged 30 had two drops o... \n", "9 Hello doctor,Some mornings during the week I g... \n", "\n", " answer_icliniq \\\n", "0 Hello, Welcome to Chat Doctor forum. I can und... \n", "1 Hello, Wellcome to ChatDoctor. There are few r... \n", "2 Hello. The brown discharge should be temporary... \n", "3 Hello, Welcome to Chat Doctor forum. I have go... \n", "4 Hello. The lump is mostly a hard swelling whic... \n", "5 Hi. Firstly, I want to tell you that the tests... \n", "6 Hi. According to guidelines when there is a si... \n", "7 Hello. As the serum beta hCG levels are less t... \n", "8 Hi. I want to assure you not to worry as every... \n", "9 Hello. I understand your concern and would ex... \n", "\n", " answer_chatgpt \\\n", "0 It is possible that you still have an infectio... \n", "1 Hello! Thank you for reaching out.\\n\\nCocaine ... \n", "2 Hello! It's not uncommon to experience some ir... \n", "3 As an AI language model, I am not a doctor and... \n", "4 Hello,\\n\\nIt is normal to have some swelling a... \n", "5 Hello,\\n\\nI understand your concern about poss... \n", "6 Hello,\\n\\nBased on your CT results, it appears... \n", "7 There are many possible reasons for late perio... \n", "8 I'm sorry to hear about your friend's situatio... \n", "9 Hello! It's difficult to give a definitive dia... \n", "\n", " answer_chatdoctor \n", "0 1) There is no need to worry about reinfection... \n", "1 1) Cocaine use can affect fertility by causing... \n", "2 1) The brown discharge is due to the hormonal ... \n", "3 Hi, welcome to Chat Doctor forum. I understand... \n", "4 Hi, Thanks for your query. It appears that you... \n", "5 Hi, welcome to Chat Doctor forum. As your sex ... \n", "6 1) The nodules are probably benign and unlikel... \n", "7 1. The delay in periods is usually due to stre... \n", "8 1. The side effects of phenol include irritati... \n", "9 Hi, Welcome to Chat Doctor forum. The symptoms... " ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.head(10)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "qa-env", "language": "python", "name": "qa-env" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.18" } }, "nbformat": 4, "nbformat_minor": 4 }