{ "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", " | input | \n", "answer_icliniq | \n", "answer_chatgpt | \n", "answer_chatdoctor | \n", "
---|---|---|---|---|
0 | \n", "Hello doctor,I had mumps five months ago and a... | \n", "Hello, Welcome to Chat Doctor forum. I can und... | \n", "It is possible that you still have an infectio... | \n", "1) There is no need to worry about reinfection... | \n", "
1 | \n", "Hello doctor,I am trying to conceive but my hu... | \n", "Hello, Wellcome to ChatDoctor. There are few r... | \n", "Hello! Thank you for reaching out.\\n\\nCocaine ... | \n", "1) Cocaine use can affect fertility by causing... | \n", "
2 | \n", "Hello doctor,I am currently on the Yaz contrac... | \n", "Hello. The brown discharge should be temporary... | \n", "Hello! It's not uncommon to experience some ir... | \n", "1) The brown discharge is due to the hormonal ... | \n", "
3 | \n", "Hello doctor,My son aged 13 years has got his ... | \n", "Hello, Welcome to Chat Doctor forum. I have go... | \n", "As an AI language model, I am not a doctor and... | \n", "Hi, welcome to Chat Doctor forum. I understand... | \n", "
4 | \n", "Hello doctor,I just got one side of my wisdom ... | \n", "Hello. The lump is mostly a hard swelling whic... | \n", "Hello,\\n\\nIt is normal to have some swelling a... | \n", "Hi, Thanks for your query. It appears that you... | \n", "
5 | \n", "Hello doctor,I had deep unprotected sex for th... | \n", "Hi. Firstly, I want to tell you that the tests... | \n", "Hello,\\n\\nI understand your concern about poss... | \n", "Hi, welcome to Chat Doctor forum. As your sex ... | \n", "
6 | \n", "Hello doctor,I need advice after my second CT ... | \n", "Hi. According to guidelines when there is a si... | \n", "Hello,\\n\\nBased on your CT results, it appears... | \n", "1) The nodules are probably benign and unlikel... | \n", "
7 | \n", "Hi doctor,I had sex for the first time. After ... | \n", "Hello. As the serum beta hCG levels are less t... | \n", "There are many possible reasons for late perio... | \n", "1. The delay in periods is usually due to stre... | \n", "
8 | \n", "Hello doctor,My friend aged 30 had two drops o... | \n", "Hi. I want to assure you not to worry as every... | \n", "I'm sorry to hear about your friend's situatio... | \n", "1. The side effects of phenol include irritati... | \n", "
9 | \n", "Hello doctor,Some mornings during the week I g... | \n", "Hello. I understand your concern and would ex... | \n", "Hello! It's difficult to give a definitive dia... | \n", "Hi, Welcome to Chat Doctor forum. The symptoms... | \n", "