RamAnanth1 commited on
Commit
c26f78d
·
1 Parent(s): 5dd34a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +69 -2
app.py CHANGED
@@ -62,7 +62,74 @@ experiment.append_configs(
62
  exec_context = ExecutionContext()
63
  simulation = Executor(exec_context=exec_context, configs=experiment.configs)
64
 
65
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
 
67
  def plot_seir(name):
68
  raw_result, tensor_fields, sessions = simulation.execute()
@@ -77,7 +144,7 @@ def plot_seir(name):
77
  yaxis_title="People")
78
  return fig
79
 
80
- with gr.Blocks() as demo:
81
  gr.Markdown("""
82
  ## Epidemic Simulation
83
  """)
 
62
  exec_context = ExecutionContext()
63
  simulation = Executor(exec_context=exec_context, configs=experiment.configs)
64
 
65
+ css = """
66
+ .gradio-container {
67
+ font-family: 'IBM Plex Sans', sans-serif;
68
+ }
69
+ .gr-button {
70
+ color: white;
71
+ border-color: black;
72
+ background: black;
73
+ }
74
+ input[type='range'] {
75
+ accent-color: black;
76
+ }
77
+ .dark input[type='range'] {
78
+ accent-color: #dfdfdf;
79
+ }
80
+ .container {
81
+ max-width: 730px;
82
+ margin: auto;
83
+ padding-top: 1.5rem;
84
+ }
85
+ .details:hover {
86
+ text-decoration: underline;
87
+ }
88
+ .gr-button {
89
+ white-space: nowrap;
90
+ }
91
+ .gr-button:focus {
92
+ border-color: rgb(147 197 253 / var(--tw-border-opacity));
93
+ outline: none;
94
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
95
+ --tw-border-opacity: 1;
96
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
97
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px var(--tw-ring-offset-width)) var(--tw-ring-color);
98
+ --tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity));
99
+ --tw-ring-opacity: .5;
100
+ }
101
+ #advanced-btn {
102
+ font-size: .7rem !important;
103
+ line-height: 19px;
104
+ margin-top: 12px;
105
+ margin-bottom: 12px;
106
+ padding: 2px 8px;
107
+ border-radius: 14px !important;
108
+ }
109
+ #advanced-options {
110
+ display: none;
111
+ margin-bottom: 20px;
112
+ }
113
+ .footer {
114
+ margin-bottom: 45px;
115
+ margin-top: 35px;
116
+ text-align: center;
117
+ border-bottom: 1px solid #e5e5e5;
118
+ }
119
+ .footer>p {
120
+ font-size: .8rem;
121
+ display: inline-block;
122
+ padding: 0 10px;
123
+ transform: translateY(10px);
124
+ background: white;
125
+ }
126
+ .dark .footer {
127
+ border-color: #303030;
128
+ }
129
+ .dark .footer>p {
130
+ background: #0b0f19;
131
+ }
132
+ """
133
 
134
  def plot_seir(name):
135
  raw_result, tensor_fields, sessions = simulation.execute()
 
144
  yaxis_title="People")
145
  return fig
146
 
147
+ with gr.Blocks(css = css) as demo:
148
  gr.Markdown("""
149
  ## Epidemic Simulation
150
  """)