Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
gera-richarte
commited on
Commit
•
3e43423
1
Parent(s):
0212ece
Retrieve list of configs
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from datasets import load_dataset,
|
2 |
from functools import partial
|
3 |
from pandas import DataFrame
|
4 |
import gradio as gr
|
@@ -7,6 +7,7 @@ import tqdm
|
|
7 |
import json
|
8 |
import os
|
9 |
|
|
|
10 |
DEBUG = False
|
11 |
|
12 |
sets = {
|
@@ -116,20 +117,20 @@ def new_state():
|
|
116 |
with gr.Blocks(title="Dataset Explorer", fill_height = True) as demo:
|
117 |
state = new_state()
|
118 |
|
119 |
-
gr.Markdown("# Viewer for [
|
120 |
batch_size = gr.Number(10, label = "Batch Size", render=False)
|
121 |
shard = gr.Slider(label="Shard", minimum=0, maximum=10000, step=1, render=False)
|
122 |
table = gr.DataFrame(render = False)
|
123 |
# headers=["Index","TimeStamp","Bounds","CRS"],
|
124 |
|
125 |
gallery = gr.Gallery(
|
126 |
-
label=
|
127 |
interactive=False,
|
128 |
columns=5, rows=2, render=False)
|
129 |
|
130 |
with gr.Row():
|
131 |
-
dataset = gr.Textbox(label="Dataset", value=
|
132 |
-
config = gr.Dropdown(choices=
|
133 |
split = gr.Textbox(label="Split", value="train")
|
134 |
initial_shard = gr.Number(label = "Initial shard", value=0, info="-1 for whole dataset")
|
135 |
|
|
|
1 |
+
from datasets import load_dataset, get_dataset_config_names
|
2 |
from functools import partial
|
3 |
from pandas import DataFrame
|
4 |
import gradio as gr
|
|
|
7 |
import json
|
8 |
import os
|
9 |
|
10 |
+
DATASET = "satellogic/EarthView"
|
11 |
DEBUG = False
|
12 |
|
13 |
sets = {
|
|
|
117 |
with gr.Blocks(title="Dataset Explorer", fill_height = True) as demo:
|
118 |
state = new_state()
|
119 |
|
120 |
+
gr.Markdown(f"# Viewer for [{DATASET}](https://huggingface.co/datasets/satellogic/EarthView) Dataset")
|
121 |
batch_size = gr.Number(10, label = "Batch Size", render=False)
|
122 |
shard = gr.Slider(label="Shard", minimum=0, maximum=10000, step=1, render=False)
|
123 |
table = gr.DataFrame(render = False)
|
124 |
# headers=["Index","TimeStamp","Bounds","CRS"],
|
125 |
|
126 |
gallery = gr.Gallery(
|
127 |
+
label=DATASET,
|
128 |
interactive=False,
|
129 |
columns=5, rows=2, render=False)
|
130 |
|
131 |
with gr.Row():
|
132 |
+
dataset = gr.Textbox(label="Dataset", value=DATASET, interactive=False)
|
133 |
+
config = gr.Dropdown(choices=get_dataset_config_names(DATASET), label="Config", value="satellogic", )
|
134 |
split = gr.Textbox(label="Split", value="train")
|
135 |
initial_shard = gr.Number(label = "Initial shard", value=0, info="-1 for whole dataset")
|
136 |
|