Commit
•
2ae53f8
1
Parent(s):
185bd85
reorder
Browse files
app.py
CHANGED
@@ -73,14 +73,8 @@ try:
|
|
73 |
|
74 |
gr.Markdown("""
|
75 |
This app allows you to browse and view datasets from a specific Hugging Face collection.
|
76 |
-
Use the 'Previous' and 'Next' buttons to navigate through the datasets in the collection.
|
77 |
-
|
78 |
-
**Note**: This space is currently set up to display datasets from a specific collection.
|
79 |
-
If you'd like to use it for a different collection:
|
80 |
-
1. Duplicate this space
|
81 |
-
2. In your duplicated space, set the `COLLECTION_SLUG_OR_URL` environment variable to your desired collection ID or URL
|
82 |
-
3. Your new space will then display datasets from your chosen collection!
|
83 |
-
""")
|
84 |
|
85 |
index_state = gr.State(value=0)
|
86 |
|
@@ -90,7 +84,12 @@ try:
|
|
90 |
|
91 |
dataset_info = gr.Markdown(f"Dataset 1 of {len(dataset_ids)}: {dataset_ids[0]}")
|
92 |
iframe_output = gr.HTML()
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
94 |
left_btn.click(
|
95 |
navigate_dataset,
|
96 |
inputs=[gr.State(dataset_ids), index_state, gr.Number(-1, visible=False)],
|
|
|
73 |
|
74 |
gr.Markdown("""
|
75 |
This app allows you to browse and view datasets from a specific Hugging Face collection.
|
76 |
+
Use the 'Previous' and 'Next' buttons to navigate through the datasets in the collection.
|
77 |
+
See below for how to set up this app for a different collection.""")
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
index_state = gr.State(value=0)
|
80 |
|
|
|
84 |
|
85 |
dataset_info = gr.Markdown(f"Dataset 1 of {len(dataset_ids)}: {dataset_ids[0]}")
|
86 |
iframe_output = gr.HTML()
|
87 |
+
gr.Markdown("""**Note**: This space is currently set up to display datasets from a specific collection.
|
88 |
+
If you'd like to use it for a different collection:
|
89 |
+
1. Duplicate this space
|
90 |
+
2. In your duplicated space, set the `COLLECTION_SLUG_OR_URL` environment variable to your desired collection ID or URL
|
91 |
+
3. Your new space will then display datasets from your chosen collection!
|
92 |
+
""")
|
93 |
left_btn.click(
|
94 |
navigate_dataset,
|
95 |
inputs=[gr.State(dataset_ids), index_state, gr.Number(-1, visible=False)],
|