Commit
•
6902d7b
1
Parent(s):
764e17a
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ os.environ["PYOPENGL_PLATFORM"] = "egl"
|
|
21 |
# hf_dataset = load_dataset("PLAID-datasets/Tensile2d", split="all_samples")
|
22 |
hf_dataset = load_dataset("fabiencasenave/Tensile2d_test_2", split="all_samples")
|
23 |
|
24 |
-
nb_samples =
|
25 |
|
26 |
field_names_train = ["sig11", "sig22", "sig12", "U1", "U2", "q"]
|
27 |
|
@@ -92,7 +92,7 @@ def sample_info(sample_id_str, fieldn):
|
|
92 |
if __name__ == "__main__":
|
93 |
|
94 |
with gr.Blocks() as demo:
|
95 |
-
d1 = gr.Slider(0, nb_samples, value=0, label="Training sample id", info="Choose between 0 and "+str(nb_samples))
|
96 |
d2 = gr.Dropdown(field_names_train, value=field_names_train[0], label="Field name")
|
97 |
|
98 |
|
|
|
21 |
# hf_dataset = load_dataset("PLAID-datasets/Tensile2d", split="all_samples")
|
22 |
hf_dataset = load_dataset("fabiencasenave/Tensile2d_test_2", split="all_samples")
|
23 |
|
24 |
+
nb_samples = 500
|
25 |
|
26 |
field_names_train = ["sig11", "sig22", "sig12", "U1", "U2", "q"]
|
27 |
|
|
|
92 |
if __name__ == "__main__":
|
93 |
|
94 |
with gr.Blocks() as demo:
|
95 |
+
d1 = gr.Slider(0, nb_samples-1, value=0, label="Training sample id", info="Choose between 0 and "+str(nb_samples-1))
|
96 |
d2 = gr.Dropdown(field_names_train, value=field_names_train[0], label="Field name")
|
97 |
|
98 |
|