VP21 commited on
Commit
e440f22
·
verified ·
1 Parent(s): bb0737b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -11
app.py CHANGED
@@ -19,9 +19,11 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
19
  return "What magic will you build ?"
20
 
21
  @tool
22
- def calculate_bandwidth():
23
  """
24
  Calculate the recommended internet speed based on user inputs.
 
 
25
  :return: Recommended bandwidth in Mbps
26
  """
27
  usage_requirements = {
@@ -33,16 +35,6 @@ def calculate_bandwidth():
33
  "remote_work": 3 # Mbps per user
34
  }
35
 
36
- users = int(input("Enter the number of users: "))
37
- usage = {
38
- "browsing": int(input("Users browsing the web: ")),
39
- "video_call": int(input("Users on video calls: ")),
40
- "hd_streaming": int(input("Users streaming in HD: ")),
41
- "4k_streaming": int(input("Users streaming in 4K: ")),
42
- "gaming": int(input("Users gaming online: ")),
43
- "remote_work": int(input("Users working remotely: "))
44
- }
45
-
46
  total_bandwidth = sum(usage_requirements[activity] * count for activity, count in usage.items())
47
 
48
  overhead = 1.2 # 20% overhead for seamless experience
 
19
  return "What magic will you build ?"
20
 
21
  @tool
22
+ def calculate_bandwidth(users, usage):
23
  """
24
  Calculate the recommended internet speed based on user inputs.
25
+ :param users: Number of users
26
+ :param usage: Dictionary with usage categories and number of users per category
27
  :return: Recommended bandwidth in Mbps
28
  """
29
  usage_requirements = {
 
35
  "remote_work": 3 # Mbps per user
36
  }
37
 
 
 
 
 
 
 
 
 
 
 
38
  total_bandwidth = sum(usage_requirements[activity] * count for activity, count in usage.items())
39
 
40
  overhead = 1.2 # 20% overhead for seamless experience