File size: 529 Bytes
a161c9a
8b74c06
a161c9a
f9d0c50
 
 
 
d7d8c2d
8b74c06
 
9717c84
01c01b0
a161c9a
 
4d82b16
8b74c06
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# import gradio as gr
from datasets import load_dataset
import pandas as pd

def greet(name):
    return "Hello " + name + "!!"

# iface = gr.Interface(fn=greet, inputs="text", outputs="text")
# iface.launch()

data_files = {"train": "wikitext-2-raw-v1"}
dataset = load_dataset("wikitext",'wikitext-2-raw-v1', split = "train")

train_df = pd.DataFrame(dataset)
print(train_df.loc[10,'text'])
# data_files = {"train": "train.csv", "test": "test.csv"}
# dataset = load_dataset("namespace/your_dataset_name", data_files=data_files)