Spaces:
Runtime error
Runtime error
refactor: remove unused algebra and arithmetic interfaces; add GCD, LCM, and prime check implementations
Browse files- maths/algebra/algebra_interface.py +0 -16
- maths/algebra/algebra_tab.py +8 -7
- maths/arithmetic/arithmetic_interface.py +0 -10
- maths/arithmetic/arithmetic_tab.py +6 -4
- maths/equations/equations_tab.py +1 -1
- maths/{arithmetic → number_theory}/gcd.py +0 -0
- maths/{arithmetic → number_theory}/is_prime.py +0 -0
- maths/{arithmetic → number_theory}/lcm.py +0 -0
- maths/number_theory/number_theory_tab.py +3 -1
maths/algebra/algebra_interface.py
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
from maths.algebra.solve_linear_equation import solve_linear_equation_interface
|
3 |
-
from maths.algebra.evaluate_quadratic_expression import evaluate_expression_interface
|
4 |
-
from maths.algebra.simplify_radical import simplify_radical_interface
|
5 |
-
from maths.algebra.polynomial_operations import polynomial_interface
|
6 |
-
|
7 |
-
# Create the main Gradio application that combines all interfaces
|
8 |
-
algebra_app = gr.TabbedInterface(
|
9 |
-
[solve_linear_equation_interface, evaluate_expression_interface,
|
10 |
-
simplify_radical_interface, polynomial_interface],
|
11 |
-
["Linear Solver", "Expression Evaluator", "Radical Simplifier", "Polynomials"]
|
12 |
-
)
|
13 |
-
|
14 |
-
# Allow the Gradio interface to be run directly or imported
|
15 |
-
if __name__ == "__main__":
|
16 |
-
algebra_app.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
maths/algebra/algebra_tab.py
CHANGED
@@ -1,21 +1,22 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
from maths.algebra.
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
)
|
8 |
|
9 |
# Tabbed interface for algebra operations
|
10 |
algebra_interfaces_list = [
|
|
|
11 |
evaluate_expression_interface,
|
12 |
simplify_radical_interface,
|
13 |
polynomial_interface
|
14 |
]
|
15 |
algebra_tab_names = [
|
16 |
-
"
|
|
|
17 |
"Radical Simplifier",
|
18 |
-
"
|
19 |
]
|
20 |
|
21 |
algebra_tab = gr.TabbedInterface(
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
from maths.algebra.solve_linear_equation import solve_linear_equation_interface
|
4 |
+
from maths.algebra.evaluate_quadratic_expression import evaluate_expression_interface
|
5 |
+
from maths.algebra.simplify_radical import simplify_radical_interface
|
6 |
+
from maths.algebra.polynomial_operations import polynomial_interface
|
|
|
7 |
|
8 |
# Tabbed interface for algebra operations
|
9 |
algebra_interfaces_list = [
|
10 |
+
solve_linear_equation_interface,
|
11 |
evaluate_expression_interface,
|
12 |
simplify_radical_interface,
|
13 |
polynomial_interface
|
14 |
]
|
15 |
algebra_tab_names = [
|
16 |
+
"Linear Solver",
|
17 |
+
"Expression Evaluator",
|
18 |
"Radical Simplifier",
|
19 |
+
"Polynomials"
|
20 |
]
|
21 |
|
22 |
algebra_tab = gr.TabbedInterface(
|
maths/arithmetic/arithmetic_interface.py
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
from .add import add_interface
|
3 |
-
from .subtract import subtract_interface
|
4 |
-
from .multiply import multiply_interface
|
5 |
-
from .divide import divide_interface
|
6 |
-
from .gcd import gcd_interface
|
7 |
-
from .lcm import lcm_interface
|
8 |
-
from .is_prime import is_prime_interface
|
9 |
-
from .calculate_array import array_calc_interface
|
10 |
-
from .calculate_array_with_visualization import array_calc_vis_interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
maths/arithmetic/arithmetic_tab.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
-
from maths.arithmetic.
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
|
|
6 |
|
7 |
arithmetic_interfaces_list = [
|
8 |
add_interface, subtract_interface, multiply_interface,
|
|
|
1 |
import gradio as gr
|
2 |
+
from maths.arithmetic.add import add_interface
|
3 |
+
from maths.arithmetic.subtract import subtract_interface
|
4 |
+
from maths.arithmetic.multiply import multiply_interface
|
5 |
+
from maths.arithmetic.divide import divide_interface
|
6 |
+
from maths.arithmetic.calculate_array import array_calc_interface
|
7 |
+
from maths.arithmetic.calculate_array_with_visualization import array_calc_vis_interface
|
8 |
|
9 |
arithmetic_interfaces_list = [
|
10 |
add_interface, subtract_interface, multiply_interface,
|
maths/equations/equations_tab.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
from maths.equations.equations_interface import equations_app, solve_quadratic_interface
|
3 |
-
from maths.algebra.
|
4 |
from maths.geometry.trigonometry_interface import solve_trig_equations_interface
|
5 |
|
6 |
equations_tab = equations_app # Only include the composite equations_app in the equations tab to avoid duplicate Gradio blocks
|
|
|
1 |
import gradio as gr
|
2 |
from maths.equations.equations_interface import equations_app, solve_quadratic_interface
|
3 |
+
from maths.algebra.solve_linear_equation import solve_linear_equation_interface
|
4 |
from maths.geometry.trigonometry_interface import solve_trig_equations_interface
|
5 |
|
6 |
equations_tab = equations_app # Only include the composite equations_app in the equations tab to avoid duplicate Gradio blocks
|
maths/{arithmetic → number_theory}/gcd.py
RENAMED
File without changes
|
maths/{arithmetic → number_theory}/is_prime.py
RENAMED
File without changes
|
maths/{arithmetic → number_theory}/lcm.py
RENAMED
File without changes
|
maths/number_theory/number_theory_tab.py
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
-
from maths.
|
|
|
|
|
3 |
|
4 |
number_theory_interfaces_list = [gcd_interface, lcm_interface, is_prime_interface]
|
5 |
number_theory_tab_names = ["GCD", "LCM", "Prime Check"]
|
|
|
1 |
import gradio as gr
|
2 |
+
from maths.number_theory.gcd import gcd_interface
|
3 |
+
from maths.number_theory.lcm import lcm_interface
|
4 |
+
from maths.number_theory.is_prime import is_prime_interface
|
5 |
|
6 |
number_theory_interfaces_list = [gcd_interface, lcm_interface, is_prime_interface]
|
7 |
number_theory_tab_names = ["GCD", "LCM", "Prime Check"]
|