aliabd commited on
Commit
dc70fe5
·
1 Parent(s): b0e6c93

Upload with huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +6 -7
  2. run.ipynb +1 -0
  3. run.py +17 -0
README.md CHANGED
@@ -1,12 +1,11 @@
 
1
  ---
2
- title: Dataset Component
3
- emoji: 📊
4
- colorFrom: red
5
- colorTo: gray
6
  sdk: gradio
7
  sdk_version: 3.17.0
8
- app_file: app.py
9
  pinned: false
10
  ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
+
2
  ---
3
+ title: dataset_component
4
+ emoji: 🔥
5
+ colorFrom: indigo
6
+ colorTo: indigo
7
  sdk: gradio
8
  sdk_version: 3.17.0
9
+ app_file: run.py
10
  pinned: false
11
  ---
 
 
run.ipynb ADDED
@@ -0,0 +1 @@
 
 
1
+ {"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: dataset_component"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "css = \"footer {display: none !important;} .gradio-container {min-height: 0px !important;}\"\n", "\n", "with gr.Blocks(css=css) as demo:\n", " gr.Dataset(components=[gr.Textbox(visible=False)],\n", " label=\"Text Dataset\",\n", " samples=[\n", " [\"The quick brown fox jumps over the lazy dog\"],\n", " [\"Build & share delightful machine learning apps\"],\n", " [\"She sells seashells by the seashore\"],\n", " [\"Supercalifragilisticexpialidocious\"],\n", " [\"Lorem ipsum\"],\n", " [\"That's all folks!\"]\n", " ],\n", " )\n", "demo.launch()"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
run.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ css = "footer {display: none !important;} .gradio-container {min-height: 0px !important;}"
4
+
5
+ with gr.Blocks(css=css) as demo:
6
+ gr.Dataset(components=[gr.Textbox(visible=False)],
7
+ label="Text Dataset",
8
+ samples=[
9
+ ["The quick brown fox jumps over the lazy dog"],
10
+ ["Build & share delightful machine learning apps"],
11
+ ["She sells seashells by the seashore"],
12
+ ["Supercalifragilisticexpialidocious"],
13
+ ["Lorem ipsum"],
14
+ ["That's all folks!"]
15
+ ],
16
+ )
17
+ demo.launch()