Commit 3: Add 35 file(s)
Browse files- demos/native_plots/bar_plot_demo.py +12 -11
- requirements.txt +2 -2
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 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
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@
|
2 |
-
https://gradio-pypi-previews.s3.amazonaws.com/
|
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
|