freddyaboulton HF Staff commited on
Commit
64fb6d8
·
verified ·
1 Parent(s): 458676b

Upload folder using huggingface_hub

Browse files
Files changed (6) hide show
  1. bar_plot_demo.py +1 -1
  2. line_plot_demo.py +1 -1
  3. requirements.txt +2 -2
  4. run.ipynb +1 -1
  5. run.py +3 -3
  6. scatter_plot_demo.py +1 -1
bar_plot_demo.py CHANGED
@@ -1,5 +1,5 @@
1
  import gradio as gr
2
- from data import temp_sensor_data, food_rating_data
3
 
4
  with gr.Blocks() as bar_plots:
5
  with gr.Row():
 
1
  import gradio as gr
2
+ from data import temp_sensor_data, food_rating_data # type: ignore
3
 
4
  with gr.Blocks() as bar_plots:
5
  with gr.Row():
line_plot_demo.py CHANGED
@@ -1,5 +1,5 @@
1
  import gradio as gr
2
- from data import temp_sensor_data, food_rating_data
3
 
4
  with gr.Blocks() as line_plots:
5
  with gr.Row():
 
1
  import gradio as gr
2
+ from data import temp_sensor_data, food_rating_data # type: ignore
3
 
4
  with gr.Blocks() as line_plots:
5
  with gr.Row():
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- gradio-client @ git+https://github.com/gradio-app/gradio@58d9d9e98194dada5267ac1599063cf21723cbde#subdirectory=client/python
2
- https://gradio-pypi-previews.s3.amazonaws.com/58d9d9e98194dada5267ac1599063cf21723cbde/gradio-5.42.0-py3-none-any.whl
3
  vega_datasets
4
  pandas
 
1
+ gradio-client @ git+https://github.com/gradio-app/gradio@d68c663fc9fffed4840fd74bed940fba3e2bc174#subdirectory=client/python
2
+ https://gradio-pypi-previews.s3.amazonaws.com/d68c663fc9fffed4840fd74bed940fba3e2bc174/gradio-5.42.0-py3-none-any.whl
3
  vega_datasets
4
  pandas
run.ipynb CHANGED
@@ -1 +1 @@
1
- {"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: native_plots"]}, {"cell_type": "code", "execution_count": null, "id": "272996653310673477252411125948039410165", "metadata": {}, "outputs": [], "source": ["!pip install -q gradio vega_datasets pandas "]}, {"cell_type": "code", "execution_count": null, "id": "288918539441861185822528903084949547379", "metadata": {}, "outputs": [], "source": ["# Downloading files from the demo repo\n", "import os\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/native_plots/bar_plot_demo.py\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/native_plots/data.py\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/native_plots/line_plot_demo.py\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/native_plots/scatter_plot_demo.py"]}, {"cell_type": "code", "execution_count": null, "id": "44380577570523278879349135829904343037", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "from scatter_plot_demo import scatter_plots\n", "from line_plot_demo import line_plots\n", "from bar_plot_demo import bar_plots\n", "\n", "with gr.Blocks() as demo:\n", " with gr.Tabs():\n", " with gr.TabItem(\"Line Plot\"):\n", " line_plots.render()\n", " with gr.TabItem(\"Scatter Plot\"):\n", " scatter_plots.render()\n", " with gr.TabItem(\"Bar Plot\"):\n", " bar_plots.render()\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
 
1
+ {"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: native_plots"]}, {"cell_type": "code", "execution_count": null, "id": "272996653310673477252411125948039410165", "metadata": {}, "outputs": [], "source": ["!pip install -q gradio vega_datasets pandas "]}, {"cell_type": "code", "execution_count": null, "id": "288918539441861185822528903084949547379", "metadata": {}, "outputs": [], "source": ["# Downloading files from the demo repo\n", "import os\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/native_plots/bar_plot_demo.py\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/native_plots/data.py\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/native_plots/line_plot_demo.py\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/native_plots/scatter_plot_demo.py"]}, {"cell_type": "code", "execution_count": null, "id": "44380577570523278879349135829904343037", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "from scatter_plot_demo import scatter_plots # type: ignore\n", "from line_plot_demo import line_plots # type: ignore\n", "from bar_plot_demo import bar_plots # type: ignore\n", "\n", "with gr.Blocks() as demo:\n", " with gr.Tabs():\n", " with gr.TabItem(\"Line Plot\"):\n", " line_plots.render()\n", " with gr.TabItem(\"Scatter Plot\"):\n", " scatter_plots.render()\n", " with gr.TabItem(\"Bar Plot\"):\n", " bar_plots.render()\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
run.py CHANGED
@@ -1,8 +1,8 @@
1
  import gradio as gr
2
 
3
- from scatter_plot_demo import scatter_plots
4
- from line_plot_demo import line_plots
5
- from bar_plot_demo import bar_plots
6
 
7
  with gr.Blocks() as demo:
8
  with gr.Tabs():
 
1
  import gradio as gr
2
 
3
+ from scatter_plot_demo import scatter_plots # type: ignore
4
+ from line_plot_demo import line_plots # type: ignore
5
+ from bar_plot_demo import bar_plots # type: ignore
6
 
7
  with gr.Blocks() as demo:
8
  with gr.Tabs():
scatter_plot_demo.py CHANGED
@@ -1,5 +1,5 @@
1
  import gradio as gr
2
- from data import temp_sensor_data, food_rating_data
3
 
4
  with gr.Blocks() as scatter_plots:
5
  with gr.Row():
 
1
  import gradio as gr
2
+ from data import temp_sensor_data, food_rating_data # type: ignore
3
 
4
  with gr.Blocks() as scatter_plots:
5
  with gr.Row():