File size: 2,780 Bytes
9d8a330 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
{
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"############ YAAHOO QUESTION ANSWER #################\n",
"\n",
"df = pd.read_json(\"hf://datasets/baohuynhbk14/yahoo-question-answers-question-answers/yahoo_answers_title_answer.jsonl\", lines=True)\n",
"\n",
"test = list( df.data )\n",
"\n",
"df = pd.DataFrame( {\n",
" \"Questions\" : [ test[index][0] for index in range( len( test ) ) ] ,\n",
" \"Answers\" : [ test[index][1] for index in range( len( test ) ) ]\n",
"})\n",
"df.to_csv(\"Question_Ans_Dataset.csv\" ,index = False )"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [],
"source": [
"######## DATASET LINK : https://huggingface.co/datasets/junaid20/question_answer #############\n",
"\n",
"\n",
"df = pd.read_csv(\"hf://datasets/junaid20/question_answer/dataset.csv\")\n",
"df.drop( \"text\" , axis = 1 , inplace = True )\n",
"df.to_csv(\"Question_Ans_Dataset_2.csv\" , index = False)"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [],
"source": [
"########## DATASET LINK : https://huggingface.co/datasets/toughdata/quora-question-answer-dataset ###########################\n",
"df = pd.read_json(\"hf://datasets/toughdata/quora-question-answer-dataset/Quora-QuAD.jsonl\", lines=True)\n",
"df.to_csv(\"Question_Ans_Dataset_3.csv\" , index = False )\n",
"\n",
"\n",
"#### CANNOT DONWLOAD THIS DATASET BECAUSE THIS IS TOOO LARGE #########"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"# ########## DATASET LINK : https://huggingface.co/datasets/formido/outfit_recomendation ##########\n",
"\n",
"df = pd.read_csv(\"hf://datasets/formido/outfit_recomendation/new_data.csv\")\n",
"\n",
"df[\"instruction\"] = df.instruction + \" \" + df.input\n",
"\n",
"df.drop( \"input\" , axis = 1 , inplace = True )\n",
"\n",
"df.to_csv(\"Recommendation_Data.csv\" , index = False )"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "sunyenv",
"language": "python",
"name": "python3"
},
"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.10.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
|