abidlabs HF Staff commited on
Commit
c4ca420
·
verified ·
1 Parent(s): fa77bfc

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +1 -1
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
- return ValueError("adding is not supported")
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