Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
add warning
Browse files- app.py +12 -1
- requirements.txt +2 -1
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import os
|
2 |
|
3 |
import gradio as gr
|
|
|
4 |
import numpy as np
|
5 |
import plotly.graph_objs as go
|
6 |
from datasets import load_dataset
|
@@ -123,6 +124,16 @@ plot_style_dropdown = gr.Dropdown(choices=["2D", "3D"], label="Plot Style")
|
|
123 |
functional_dropdown = gr.Dropdown(choices=["PBE", "PBESol", "SCAN"], label="Functional")
|
124 |
finite_temp_toggle = gr.Checkbox(label="Enable Finite Temperature Estimation")
|
125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
# Create Gradio interface
|
127 |
iface = gr.Interface(
|
128 |
fn=create_phase_diagram,
|
@@ -134,7 +145,7 @@ iface = gr.Interface(
|
|
134 |
functional_dropdown,
|
135 |
finite_temp_toggle,
|
136 |
],
|
137 |
-
outputs=gr.Plot(label="Phase Diagram"),
|
138 |
title="LeMaterial - Phase Diagram Viewer",
|
139 |
description="Generate a phase diagram for a set of elements using LeMat-Bulk data.",
|
140 |
)
|
|
|
1 |
import os
|
2 |
|
3 |
import gradio as gr
|
4 |
+
from gradio_banner import Banner
|
5 |
import numpy as np
|
6 |
import plotly.graph_objs as go
|
7 |
from datasets import load_dataset
|
|
|
124 |
functional_dropdown = gr.Dropdown(choices=["PBE", "PBESol", "SCAN"], label="Functional")
|
125 |
finite_temp_toggle = gr.Checkbox(label="Enable Finite Temperature Estimation")
|
126 |
|
127 |
+
banner = Banner(value="This application uses energy correction schemes directly" +
|
128 |
+
" from the data providers (Alexandria, MP) and has the 2020 MP"+
|
129 |
+
" Compatibility scheme applied to OQMD. However, because we did"+
|
130 |
+
" not directly apply the compatibility schemes to Alexandria, MP"+
|
131 |
+
" we have noticed discrepencies in the data. While the correction"+
|
132 |
+
" scheme will be standardized in a soon to be released update, for"+
|
133 |
+
" now please take caution when analyzing the results of this"+
|
134 |
+
" application.",
|
135 |
+
variant="warning")
|
136 |
+
|
137 |
# Create Gradio interface
|
138 |
iface = gr.Interface(
|
139 |
fn=create_phase_diagram,
|
|
|
145 |
functional_dropdown,
|
146 |
finite_temp_toggle,
|
147 |
],
|
148 |
+
outputs=[banner, gr.Plot(label="Phase Diagram")],
|
149 |
title="LeMaterial - Phase Diagram Viewer",
|
150 |
description="Generate a phase diagram for a set of elements using LeMat-Bulk data.",
|
151 |
)
|
requirements.txt
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
plotly
|
2 |
pymatgen
|
3 |
gradio
|
4 |
-
datasets
|
|
|
|
1 |
plotly
|
2 |
pymatgen
|
3 |
gradio
|
4 |
+
datasets
|
5 |
+
gradio_banner
|