Spaces:
Runtime error
Runtime error
feat: enhance input parsing in Gradio interface to support semicolon-separated numbers
Browse files
maths/operations_research/simplex_solver_with_steps.py
CHANGED
@@ -167,8 +167,8 @@ def simplex_solver_with_steps(c, A, b, bounds):
|
|
167 |
# Gradio interface
|
168 |
|
169 |
def parse_input_list(s):
|
170 |
-
# Helper to parse comma/space separated numbers
|
171 |
-
return [float(x) for x in s.replace(',', ' ').split() if x.strip()]
|
172 |
|
173 |
def parse_matrix(s):
|
174 |
# Helper to parse matrix input as rows separated by newlines, columns by comma/space
|
|
|
167 |
# Gradio interface
|
168 |
|
169 |
def parse_input_list(s):
|
170 |
+
# Helper to parse comma/space/semicolon separated numbers
|
171 |
+
return [float(x) for x in s.replace(';', ' ').replace(',', ' ').split() if x.strip()]
|
172 |
|
173 |
def parse_matrix(s):
|
174 |
# Helper to parse matrix input as rows separated by newlines, columns by comma/space
|