{ "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 }