mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-08 19:10:56 +00:00
excel dataset
This commit is contained in:
parent
5b7d24b1c3
commit
a56ea48d71
2 changed files with 16 additions and 3 deletions
|
|
@ -33,7 +33,12 @@ class CustomDataset(BaseDataset):
|
|||
def load(self):
|
||||
if self.dataset:
|
||||
return
|
||||
df = pandas.read_csv(self.url)
|
||||
# TODO: better support w/ data url
|
||||
if self.url.endswith(".csv"):
|
||||
df = pandas.read_csv(self.url)
|
||||
elif self.url.endswith(".xlsx"):
|
||||
df = pandas.read_excel(self.url)
|
||||
|
||||
self.dataset = Dataset.from_pandas(df)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue