spagestic commited on
Commit
d29336a
·
1 Parent(s): f6cc900

feat: enhance Gradio interfaces for trigonometric functions with detailed descriptions and examples

Browse files
maths/geometry/cos_degrees.py CHANGED
@@ -10,5 +10,6 @@ cos_degrees_interface = gr.Interface(
10
  inputs=gr.Number(label="Angle (degrees)"),
11
  outputs="number",
12
  title="Cosine Calculator",
13
- description="Calculate cosine of an angle in degrees."
 
14
  )
 
10
  inputs=gr.Number(label="Angle (degrees)"),
11
  outputs="number",
12
  title="Cosine Calculator",
13
+ description="Calculate the cosine of an angle in degrees. Enter an angle (e.g., 60) to get its cosine value.",
14
+ examples=[[0], [60], [90], [180]]
15
  )
maths/geometry/inverse_trig_functions.py CHANGED
@@ -39,5 +39,11 @@ inverse_trig_interface = gr.Interface(
39
  ],
40
  outputs="text",
41
  title="Inverse Trigonometry Calculator",
42
- description="Calculate inverse trigonometric functions. Output in degrees."
 
 
 
 
 
 
43
  )
 
39
  ],
40
  outputs="text",
41
  title="Inverse Trigonometry Calculator",
42
+ description="Calculate inverse trigonometric functions (asin, acos, atan) and get the result in degrees. For asin and acos, input must be between -1 and 1. Example: asin(0.5) = 30 degrees.",
43
+ examples=[
44
+ [0.5, "asin"],
45
+ [0.5, "acos"],
46
+ [1, "atan"],
47
+ [-1, "asin"]
48
+ ]
49
  )
maths/geometry/sin_degrees.py CHANGED
@@ -10,5 +10,6 @@ sin_degrees_interface = gr.Interface(
10
  inputs=gr.Number(label="Angle (degrees)"),
11
  outputs="number",
12
  title="Sine Calculator",
13
- description="Calculate sine of an angle in degrees."
 
14
  )
 
10
  inputs=gr.Number(label="Angle (degrees)"),
11
  outputs="number",
12
  title="Sine Calculator",
13
+ description="Calculate the sine of an angle in degrees. Enter an angle (e.g., 30) to get its sine value.",
14
+ examples=[[0], [30], [45], [90]]
15
  )
maths/geometry/solve_trig_equations.py CHANGED
@@ -78,5 +78,11 @@ solve_trig_equations_interface = gr.Interface(
78
  ],
79
  outputs="text",
80
  title="Trigonometric Equation Solver",
81
- description="Solves equations like a * func(x) + b = c for x in a given interval (degrees)."
 
 
 
 
 
 
82
  )
 
78
  ],
79
  outputs="text",
80
  title="Trigonometric Equation Solver",
81
+ description="Solves equations like a * func(x) + b = c for x in a given interval (degrees). Enter the coefficients, select the function, and specify the interval for x. Example: Solve 2*sin(x) + 1 = 1 for x in [0,360] degrees.",
82
+ examples=[
83
+ [2, 1, 1, "sin", "0,360"],
84
+ [1, 0, 0.5, "cos", "0,360"],
85
+ [1, 0, 1, "tan", "0,360"],
86
+ [1, 0, 2, "sin", "0,360"]
87
+ ]
88
  )
maths/geometry/tan_degrees.py CHANGED
@@ -10,5 +10,6 @@ tan_degrees_interface = gr.Interface(
10
  inputs=gr.Number(label="Angle (degrees)"),
11
  outputs="number",
12
  title="Tangent Calculator",
13
- description="Calculate tangent of an angle in degrees."
 
14
  )
 
10
  inputs=gr.Number(label="Angle (degrees)"),
11
  outputs="number",
12
  title="Tangent Calculator",
13
+ description="Calculate the tangent of an angle in degrees. Enter an angle (e.g., 45) to get its tangent value.",
14
+ examples=[[0], [45], [60], [90]]
15
  )
maths/geometry/trig_identities.py CHANGED
@@ -69,5 +69,11 @@ trig_identities_interface = gr.Interface(
69
  ],
70
  outputs="text",
71
  title="Trigonometric Identities Demonstrator",
72
- description="Show common trigonometric identities for a given angle."
 
 
 
 
 
 
73
  )
 
69
  ],
70
  outputs="text",
71
  title="Trigonometric Identities Demonstrator",
72
+ description="Show common trigonometric identities for a given angle. Select an identity and enter an angle (e.g., 45) to see the identity demonstrated with calculated values.",
73
+ examples=[
74
+ [45, "pythagorean1"],
75
+ [60, "pythagorean2"],
76
+ [30, "pythagorean3"],
77
+ [90, "all"]
78
+ ]
79
  )