Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -135,14 +135,14 @@ def plot_scatter_tab5(cat, x, y, z, col):
|
|
135 |
|
136 |
|
137 |
# Tab 6
|
138 |
-
eval_set=raw_data
|
139 |
-
def random_sample(r: gr.Request):
|
140 |
-
|
141 |
-
|
142 |
|
143 |
|
144 |
-
|
145 |
-
|
146 |
|
147 |
# Gradio Interface
|
148 |
with gr.Blocks() as demo:
|
@@ -229,15 +229,15 @@ with gr.Blocks() as demo:
|
|
229 |
],
|
230 |
gr.Plot(label="plot", format="png",), allow_flagging="never",
|
231 |
)
|
232 |
-
with gr.TabItem("Dataset Viewer"):
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
|
237 |
-
|
238 |
-
|
239 |
|
240 |
-
|
241 |
|
242 |
|
243 |
# Launch the Gradio app
|
|
|
135 |
|
136 |
|
137 |
# Tab 6
|
138 |
+
# eval_set=raw_data
|
139 |
+
# def random_sample(r: gr.Request):
|
140 |
+
# sample_index = np.random.randint(0, len(eval_set) - 1)
|
141 |
+
# sample = eval_set[sample_index]
|
142 |
|
143 |
|
144 |
+
# markdown_text = '\n\n'.join([f"**{key}**:\n\n{value}" for key, value in sample.items()])
|
145 |
+
# return markdown_text
|
146 |
|
147 |
# Gradio Interface
|
148 |
with gr.Blocks() as demo:
|
|
|
229 |
],
|
230 |
gr.Plot(label="plot", format="png",), allow_flagging="never",
|
231 |
)
|
232 |
+
# with gr.TabItem("Dataset Viewer"):
|
233 |
+
# with gr.Row():
|
234 |
+
# # loads one sample
|
235 |
+
# button = gr.Button("Show Random Sample")
|
236 |
|
237 |
+
# with gr.Row():
|
238 |
+
# sample_display = gr.Markdown("{sampled data loads here}")
|
239 |
|
240 |
+
# button.click(fn=random_sample, outputs=[sample_display])
|
241 |
|
242 |
|
243 |
# Launch the Gradio app
|