freddyaboulton HF Staff commited on
Commit
7f68c90
·
verified ·
1 Parent(s): e355d98

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. bar_plot_demo.py +12 -11
  2. requirements.txt +2 -2
bar_plot_demo.py CHANGED
@@ -10,17 +10,18 @@ with gr.Blocks() as bar_plots:
10
  group_by = gr.Radio(["None", "30m", "1h", "4h", "1d"], value="None", label="Group by")
11
  aggregate = gr.Radio(["sum", "mean", "median", "min", "max"], value="sum", label="Aggregation")
12
 
13
- temp_by_time = gr.BarPlot(
14
- temp_sensor_data,
15
- x="time",
16
- y="temperature",
17
- )
18
- temp_by_time_location = gr.BarPlot(
19
- temp_sensor_data,
20
- x="time",
21
- y="temperature",
22
- color="location",
23
- )
 
24
 
25
  time_graphs = [temp_by_time, temp_by_time_location]
26
  group_by.change(
 
10
  group_by = gr.Radio(["None", "30m", "1h", "4h", "1d"], value="None", label="Group by")
11
  aggregate = gr.Radio(["sum", "mean", "median", "min", "max"], value="sum", label="Aggregation")
12
 
13
+ with gr.Draggable():
14
+ temp_by_time = gr.BarPlot(
15
+ temp_sensor_data,
16
+ x="time",
17
+ y="temperature",
18
+ )
19
+ temp_by_time_location = gr.BarPlot(
20
+ temp_sensor_data,
21
+ x="time",
22
+ y="temperature",
23
+ color="location",
24
+ )
25
 
26
  time_graphs = [temp_by_time, temp_by_time_location]
27
  group_by.change(
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- gradio-client @ git+https://github.com/gradio-app/gradio@61a7a7b8cea7a61222e29b4688150a3d958e5581#subdirectory=client/python
2
- https://gradio-pypi-previews.s3.amazonaws.com/61a7a7b8cea7a61222e29b4688150a3d958e5581/gradio-5.43.1-py3-none-any.whl
3
  vega_datasets
4
  pandas
 
1
+ gradio-client @ git+https://github.com/gradio-app/gradio@dfc0e0305068dbd16ce905afc73d139e1e51eb46#subdirectory=client/python
2
+ https://gradio-pypi-previews.s3.amazonaws.com/dfc0e0305068dbd16ce905afc73d139e1e51eb46/gradio-5.43.1-py3-none-any.whl
3
  vega_datasets
4
  pandas