Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -155,7 +155,8 @@ def interpolate_and_plot(x_input, y_input, x_predict, method, plot_title, x_labe
|
|
155 |
x_predict = float(x_predict)
|
156 |
if x_predict < min(x) or x_predict > max(x):
|
157 |
error_msg = f"Error: Prediction x value must be between {min(x)} and {max(x)}."
|
158 |
-
return
|
|
|
159 |
|
160 |
y_predict = np.interp(x_predict, x_interp, y_interp)
|
161 |
|
|
|
155 |
x_predict = float(x_predict)
|
156 |
if x_predict < min(x) or x_predict > max(x):
|
157 |
error_msg = f"Error: Prediction x value must be between {min(x)} and {max(x)}."
|
158 |
+
return f'<p style="color: red;">{error_msg}</p>'
|
159 |
+
#return create_error_plot(error_msg), f'<p style="color: red;">{error_msg}</p>'
|
160 |
|
161 |
y_predict = np.interp(x_predict, x_interp, y_interp)
|
162 |
|