freddyaboulton HF Staff commited on
Commit
fdff9e5
·
verified ·
1 Parent(s): e891d60

Commit 3: Add 35 file(s)

Browse files
demos/native_plots/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,5 +1,5 @@
1
- gradio-client @ git+https://github.com/gradio-app/gradio@39d7ac8fc112ad223e073086f6cb433799614ed0#subdirectory=client/python
2
- https://gradio-pypi-previews.s3.amazonaws.com/39d7ac8fc112ad223e073086f6cb433799614ed0/gradio-5.43.1-py3-none-any.whl
3
  pypistats==1.1.0
4
  plotly
5
  matplotlib
 
1
+ gradio-client @ git+https://github.com/gradio-app/gradio@c0cd45afa023bebd0771bfe9a75ff5dd0a760774#subdirectory=client/python
2
+ https://gradio-pypi-previews.s3.amazonaws.com/c0cd45afa023bebd0771bfe9a75ff5dd0a760774/gradio-5.43.1-py3-none-any.whl
3
  pypistats==1.1.0
4
  plotly
5
  matplotlib