freddyaboulton HF Staff commited on
Commit
826e921
·
verified ·
1 Parent(s): 3a3560d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -4,6 +4,15 @@ import os
4
  print("OS", os.getenv("OPENID_PROVIDER_URL"))
5
 
6
  def calculator(num1, operation, num2):
 
 
 
 
 
 
 
 
 
7
  if operation == "add":
8
  return num1 + num2
9
  elif operation == "subtract":
@@ -34,4 +43,4 @@ demo = gr.Interface(
34
  )
35
 
36
  if __name__ == "__main__":
37
- demo.launch()
 
4
  print("OS", os.getenv("OPENID_PROVIDER_URL"))
5
 
6
  def calculator(num1, operation, num2):
7
+ """
8
+ Calculate the result of the operation.
9
+ Args:
10
+ num1: The first number
11
+ operation: The operation to perform
12
+ num2: The second number
13
+ Returns:
14
+ The result of the operation
15
+ """
16
  if operation == "add":
17
  return num1 + num2
18
  elif operation == "subtract":
 
43
  )
44
 
45
  if __name__ == "__main__":
46
+ demo.launch(mcp_server=True)