freddyaboulton HF Staff commited on
Commit
abadbb7
·
verified ·
1 Parent(s): f4e0801

Commit 1: Add 50 file(s)

Browse files
Files changed (1) hide show
  1. demos/calculator/run.py +2 -11
demos/calculator/run.py CHANGED
@@ -1,15 +1,6 @@
1
  import gradio as gr
2
 
3
- def calculator(num1: float, operation: str, num2: float) -> float:
4
- """
5
- Calculator function.
6
- Args:
7
- num1: The first number to calculate.
8
- operation: The operation to perform.
9
- num2: The second number to calculate.
10
- Returns:
11
- The result of the calculation.
12
- """
13
  if operation == "add":
14
  return num1 + num2
15
  elif operation == "subtract":
@@ -40,4 +31,4 @@ demo = gr.Interface(
40
  )
41
 
42
  if __name__ == "__main__":
43
- demo.launch(mcp_server=True)
 
1
  import gradio as gr
2
 
3
+ def calculator(num1, operation, num2):
 
 
 
 
 
 
 
 
 
4
  if operation == "add":
5
  return num1 + num2
6
  elif operation == "subtract":
 
31
  )
32
 
33
  if __name__ == "__main__":
34
+ demo.launch()