Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -11,14 +11,15 @@ import sys
|
|
11 |
import importlib.util
|
12 |
import time
|
13 |
from datetime import timedelta
|
14 |
-
|
15 |
# Configure Streamlit for Hugging Face Spaces
|
16 |
st.set_page_config(
|
17 |
page_title="Cubic Root Analysis (C++ Accelerated)",
|
18 |
layout="wide",
|
19 |
initial_sidebar_state="collapsed"
|
20 |
)
|
21 |
-
|
|
|
22 |
# Create a class for advanced progress tracking
|
23 |
class AdvancedProgressBar:
|
24 |
def __init__(self, total_steps, description="Processing", auto_refresh=True):
|
@@ -2013,7 +2014,7 @@ if cpp_compiled:
|
|
2013 |
else:
|
2014 |
st.warning("⚠️ C++ module compilation failed. Falling back to Python implementations with high precision SymPy calculations.")
|
2015 |
|
2016 |
-
st.info(f"Using
|
2017 |
|
2018 |
# Define three tabs
|
2019 |
tab1, tab2, tab3 = st.tabs(["z*(β) Curves", "Complex Root Analysis", "Differential Analysis"])
|
|
|
11 |
import importlib.util
|
12 |
import time
|
13 |
from datetime import timedelta
|
14 |
+
import mpmath
|
15 |
# Configure Streamlit for Hugging Face Spaces
|
16 |
st.set_page_config(
|
17 |
page_title="Cubic Root Analysis (C++ Accelerated)",
|
18 |
layout="wide",
|
19 |
initial_sidebar_state="collapsed"
|
20 |
)
|
21 |
+
# Set decimal precision to 50 digits
|
22 |
+
mpmath.mp.dps = 50
|
23 |
# Create a class for advanced progress tracking
|
24 |
class AdvancedProgressBar:
|
25 |
def __init__(self, total_steps, description="Processing", auto_refresh=True):
|
|
|
2014 |
else:
|
2015 |
st.warning("⚠️ C++ module compilation failed. Falling back to Python implementations with high precision SymPy calculations.")
|
2016 |
|
2017 |
+
st.info(f"Using high precision calculations with {mpmath.mp.dps} decimal digits for accurate results.")
|
2018 |
|
2019 |
# Define three tabs
|
2020 |
tab1, tab2, tab3 = st.tabs(["z*(β) Curves", "Complex Root Analysis", "Differential Analysis"])
|