Sebasdi commited on
Commit
c6fd2a1
·
1 Parent(s): d744595

Add Gradio dataset viewer

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from datasets import load_dataset
3
+
4
+ # Load dataset
5
+ dataset = load_dataset("Sebasdi/ARC_50_full")
6
+
7
+ # Define a function to display dataset rows
8
+ def show_example(index):
9
+ example = dataset['train'][index]
10
+ return example
11
+
12
+ # Create a Gradio interface
13
+ interface = gr.Interface(fn=show_example, inputs="slider", outputs="json", live=True)
14
+
15
+ # Launch the interface
16
+ interface.launch()