Spaces:
Sleeping
Sleeping
Add timeout
Browse files
app.py
CHANGED
|
@@ -40,7 +40,7 @@ def greet(
|
|
| 40 |
"Please upload a CSV file!",
|
| 41 |
)
|
| 42 |
# Look at some statistics of the file:
|
| 43 |
-
df = pd.read_csv(file_obj
|
| 44 |
if len(df) == 0:
|
| 45 |
return (
|
| 46 |
empty_df,
|
|
@@ -69,7 +69,6 @@ def greet(
|
|
| 69 |
binary_operators = str(binary_operators).replace("'", '"')
|
| 70 |
unary_operators = str(unary_operators).replace("'", '"')
|
| 71 |
|
| 72 |
-
df = pd.read_csv(file_obj)
|
| 73 |
y = np.array(df[col_to_fit])
|
| 74 |
X = df.drop([col_to_fit], axis=1)
|
| 75 |
|
|
@@ -79,6 +78,7 @@ def greet(
|
|
| 79 |
niterations=niterations,
|
| 80 |
binary_operators=binary_operators,
|
| 81 |
unary_operators=unary_operators,
|
|
|
|
| 82 |
)
|
| 83 |
model.fit(X, y)
|
| 84 |
|
|
|
|
| 40 |
"Please upload a CSV file!",
|
| 41 |
)
|
| 42 |
# Look at some statistics of the file:
|
| 43 |
+
df = pd.read_csv(file_obj)
|
| 44 |
if len(df) == 0:
|
| 45 |
return (
|
| 46 |
empty_df,
|
|
|
|
| 69 |
binary_operators = str(binary_operators).replace("'", '"')
|
| 70 |
unary_operators = str(unary_operators).replace("'", '"')
|
| 71 |
|
|
|
|
| 72 |
y = np.array(df[col_to_fit])
|
| 73 |
X = df.drop([col_to_fit], axis=1)
|
| 74 |
|
|
|
|
| 78 |
niterations=niterations,
|
| 79 |
binary_operators=binary_operators,
|
| 80 |
unary_operators=unary_operators,
|
| 81 |
+
timeout_in_seconds=1000,
|
| 82 |
)
|
| 83 |
model.fit(X, y)
|
| 84 |
|