Spaces:
Sleeping
Sleeping
Protection against segfaults
Browse files- gui/app.py +7 -0
gui/app.py
CHANGED
|
@@ -14,6 +14,7 @@ empty_df = pd.DataFrame(
|
|
| 14 |
"complexity": [],
|
| 15 |
}
|
| 16 |
)
|
|
|
|
| 17 |
|
| 18 |
def greet(
|
| 19 |
file_obj: tempfile._TemporaryFileWrapper,
|
|
@@ -22,6 +23,12 @@ def greet(
|
|
| 22 |
binary_operators: list,
|
| 23 |
unary_operators: list,
|
| 24 |
):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
if col_to_fit == "":
|
| 26 |
return (
|
| 27 |
empty_df,
|
|
|
|
| 14 |
"complexity": [],
|
| 15 |
}
|
| 16 |
)
|
| 17 |
+
Main = None
|
| 18 |
|
| 19 |
def greet(
|
| 20 |
file_obj: tempfile._TemporaryFileWrapper,
|
|
|
|
| 23 |
binary_operators: list,
|
| 24 |
unary_operators: list,
|
| 25 |
):
|
| 26 |
+
global Main
|
| 27 |
+
if Main is not None:
|
| 28 |
+
return (
|
| 29 |
+
empty_df,
|
| 30 |
+
"Refresh the page to run with a different configuration."
|
| 31 |
+
)
|
| 32 |
if col_to_fit == "":
|
| 33 |
return (
|
| 34 |
empty_df,
|