Update app.py
Browse files
app.py
CHANGED
|
@@ -15,22 +15,10 @@ def calculator(num1, operation, num2=None):
|
|
| 15 |
elif operation == "cube":
|
| 16 |
return num1 * num1 * num1
|
| 17 |
elif operation == "exponential":
|
| 18 |
-
return math.pow(num1, num2)
|
| 19 |
-
elif operation == "sin":
|
| 20 |
-
return math.sin(num1)
|
| 21 |
-
elif operation == "cos":
|
| 22 |
-
return math.cos(num1)
|
| 23 |
-
elif operation == "tan":
|
| 24 |
-
return math.tan(num1)
|
| 25 |
elif operation == "sqrt":
|
| 26 |
return math.sqrt(num1)
|
| 27 |
-
|
| 28 |
-
return math.sinh(num1)
|
| 29 |
-
elif operation == "cosh":
|
| 30 |
-
return math.cosh(num1)
|
| 31 |
-
elif operation == "tanh":
|
| 32 |
-
return math.tanh(num1)
|
| 33 |
-
|
| 34 |
demo = gr.Interface(
|
| 35 |
fn=calculator,
|
| 36 |
inputs=[
|
|
|
|
| 15 |
elif operation == "cube":
|
| 16 |
return num1 * num1 * num1
|
| 17 |
elif operation == "exponential":
|
| 18 |
+
return math.pow(num1, num2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
elif operation == "sqrt":
|
| 20 |
return math.sqrt(num1)
|
| 21 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
demo = gr.Interface(
|
| 23 |
fn=calculator,
|
| 24 |
inputs=[
|