{ "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", "data_hf_name = \"lavita/ChatDoctor-HealthCareMagic-100k\"\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", " | instruction | \n", "input | \n", "output | \n", "
---|---|---|---|
0 | \n", "If you are a doctor, please answer the medical... | \n", "I woke up this morning feeling the whole room ... | \n", "Hi, Thank you for posting your query. The most... | \n", "
1 | \n", "If you are a doctor, please answer the medical... | \n", "My baby has been pooing 5-6 times a day for a ... | \n", "Hi... Thank you for consulting in Chat Doctor.... | \n", "
2 | \n", "If you are a doctor, please answer the medical... | \n", "Hello, My husband is taking Oxycodone due to a... | \n", "Hello, and I hope I can help you today.First, ... | \n", "
3 | \n", "If you are a doctor, please answer the medical... | \n", "lump under left nipple and stomach pain (male)... | \n", "HI. You have two different problems. The lump ... | \n", "
4 | \n", "If you are a doctor, please answer the medical... | \n", "I have a 5 month old baby who is very congeste... | \n", "Thank you for using Chat Doctor. I would sugge... | \n", "
5 | \n", "If you are a doctor, please answer the medical... | \n", "I am F 38 in good shape work out (do triathlon... | \n", "Hi, From history it seems that you might be ha... | \n", "
6 | \n", "If you are a doctor, please answer the medical... | \n", "sir, MY uncle has ILD-Interstitial Lung diseas... | \n", "Thanks for your question on Chat Doctor. I can... | \n", "
7 | \n", "If you are a doctor, please answer the medical... | \n", "my husband was working on a project in the hou... | \n", "Hello. It could be a blood collection due to m... | \n", "
8 | \n", "If you are a doctor, please answer the medical... | \n", "hi my nine year old son had a cough and flu sy... | \n", "Hi, If the symptoms persist that long this sug... | \n", "
9 | \n", "If you are a doctor, please answer the medical... | \n", "gyno problemsfor the past few months, I have b... | \n", "Dear Friend. Welcome to Chat Doctor. I am Chat... | \n", "