|
import gradio as gr |
|
|
|
import os |
|
import numpy as np |
|
import pandas as pd |
|
|
|
df = pd.read_csv('/content/graph.csv') |
|
start_datetime = pd.to_datetime('2011-01-01 00:00:00') |
|
df['datetime'] = start_datetime + pd.to_timedelta(df['timestep'], unit='h') |
|
|
|
with gr.Blocks(title="Forecasting Geomagnetic Storms", css="") as demo: |
|
with gr.Row(): |
|
textmd = gr.Markdown(''' |
|
# Forecasting Geomagnetic Storms |
|
DST (Disturbance Storm Time) index is a measure of the strength of geomagnetic storms |
|
`predicted_t0` is the predicted DST value at the current hour |
|
`predicted_t1` is the predicted DST value at the next hour |
|
''') |
|
|
|
with gr.Row(): |
|
line = gr.LinePlot( |
|
df, |
|
x="datetime", |
|
y="DST", |
|
color="name", |
|
color_legend_position="bottom", |
|
title="Graph of Predicted DST values and Ground Truth", |
|
tooltip=["datetime", "DST", "name"], |
|
height=600, |
|
width=1000, |
|
interactive=True, |
|
) |
|
|
|
demo.launch(debug='False', share=False) |
|
|