Spaces:
Runtime error
Runtime error
File size: 668 Bytes
4f59094 763a979 4f59094 6a2c3c8 4f59094 763a979 4f59094 76cef3f 4f59094 763a979 76cef3f 6a2c3c8 4f59094 6a2c3c8 4f59094 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
import altair
import gradio as gr
from math import sqrt
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import numpy as np
# import plotly.express as px
import pandas as pd
df_pre = pd.read_csv('data.csv')
y = df_pre['audience']
def outbreak(date):
if date:
# start_day = start_day
# final_day = date
# x = np.arange(start_day, final_day + 1)
fig = plt.figure()
plt.plot(y)
plt.title("่ฆณๅฎขๆฐไบๆธฌ")
plt.ylabel("่ฆณๅฎขๆฐ")
plt.xlabel("Days since Day 0")
return fig
demo = gr.Interface(
fn=outbreak,
inputs='checkbox',
outputs=gr.Plot()
)
if __name__ == "__main__":
demo.launch() |