HF-Upload
Author: Sun Hyoung Lee
Design:
Peer Review :
Proofread:
This is a part of LangChain Open Tutorial
Overview
The process involves loading a local CSV file, converting it to a HuggingFace Dataset format, and uploading it to the Hugging Face Hub as a private dataset. This process allows for easy sharing and access of the dataset through the HuggingFace infrastructure.
Table of Contents
References
Environment Setup
Set up the environment. You may refer to Environment Setup for more details.
[Note]
langchain-opentutorialis a package that provides a set of easy-to-use environment setup, useful functions and utilities for tutorials.You can checkout the
langchain-opentutorialfor more details.
API Key Configuration
To use HuggingFace Dataset , you need to obtain a HuggingFace write token.
Once you have your API key, set it as the value for the variable HUGGINGFACEHUB_API_TOKEN .
You can set API keys in a .env file or set them manually.
[Note] If you’re not using the .env file, no worries! Just enter the keys directly in the cell below, and you’re good to go.
Upload Generated Dataset
Import the pandas library for data upload
0
Wht is an API?
["Agents\nThis combination of reasoning,\nlogi...
An API can be used by a model to make various ...
single_hop_specifc_query_synthesizer
1
What are the three essential components in an ...
['Agents\nWhat is an agent?\nIn its most funda...
The three essential components in an agent's c...
single_hop_specifc_query_synthesizer
2
What Chain-of-Thought do in agent model, how i...
['Agents\nFigure 1. General agent architecture...
Chain-of-Thought is a reasoning and logic fram...
single_hop_specifc_query_synthesizer
3
Waht is the DELETE method used for?
['Agents\nThe tools\nFoundational models, desp...
The DELETE method is a common web API method t...
single_hop_specifc_query_synthesizer
4
How do foundational components contribute to t...
['<1-hop>\n\nAgents\ncombining specialized age...
Foundational components contribute to the cogn...
NewMultiHopQuery
Upload to HuggingFace Dataset
Convert a Pandas DataFrame(df) to a Hugging Face Dataset and proceed with the upload.
Last updated