Spaces:
Running
Running
Update run.py
Browse files
run.py
CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
|
|
3 |
def calculator(num1, operation, num2):
|
4 |
if operation == "add":
|
5 |
if num2 == 0:
|
6 |
-
|
7 |
return num1 + num2
|
8 |
elif operation == "subtract":
|
9 |
return num1 - num2
|
|
|
3 |
def calculator(num1, operation, num2):
|
4 |
if operation == "add":
|
5 |
if num2 == 0:
|
6 |
+
raise ValueError("adding is not supported")
|
7 |
return num1 + num2
|
8 |
elif operation == "subtract":
|
9 |
return num1 - num2
|