Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| from analysis_db import read_db | |
| def plot_pens(alpha): | |
| df_pens = pd.read_csv('https://raw.githubusercontent.com/mwaskom/seaborn-data/master/penguins.csv') | |
| fig = plt.figure() | |
| plt.scatter(x=df_pens['bill_length_mm'], y=df_pens['bill_depth_mm']) | |
| return fig | |
| min_from = gr.Slider(label="min_from", value=0, minimum=0, maximum=120, step=1) | |
| min_to = gr.Slider(label="min_to", value=25, minimum=0, maximum=120, step=1) | |
| light_from = gr.Slider(label="light_from", value=0, minimum=0, maximum=120, step=1) | |
| light_to = gr.Slider(label="light_to", value=5, minimum=0, maximum=120, step=1) | |
| acc_from = gr.Slider(label="acc_from", value=0, minimum=0, maximum=120, step=1) | |
| acc_to = gr.Slider(label="acc_to", value=10, minimum=0, maximum=120, step=1) | |
| iface = gr.Interface( | |
| fn=read_db, | |
| inputs=['file', min_from, min_to, light_from, light_to, acc_from, acc_to], | |
| outputs=['plot', 'plot', 'plot', 'plot', 'plot', 'plot', 'plot', 'plot', 'plot', 'plot'], | |
| title="Sleep Data test", | |
| description="Let's talk pens.", | |
| article="Talk more about Penguins here, shall we?", | |
| theme='peach' | |
| ).launch() | |