File size: 458 Bytes
0d7ff87
4c5b4cf
0d7ff87
 
 
 
4c5b4cf
 
 
 
 
 
d29336a
 
4c5b4cf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import math
import gradio as gr

def sin_degrees(angle):
    """Calculate the sine of an angle in degrees."""
    return math.sin(math.radians(angle))

sin_degrees_interface = gr.Interface(
    fn=sin_degrees,
    inputs=gr.Number(label="Angle (degrees)"),
    outputs="number",
    title="Sine Calculator",
    description="Calculate the sine of an angle in degrees. Enter an angle (e.g., 30) to get its sine value.",
    examples=[[0], [30], [45], [90]]
)