Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,10 +24,18 @@ def calculate_bandwidth(users: int, usage: Dict[str, int]) -> float:
|
|
| 24 |
"""
|
| 25 |
Calculate the recommended internet speed based on user inputs.
|
| 26 |
|
| 27 |
-
:
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
"""
|
| 32 |
usage_requirements = {
|
| 33 |
"browsing": 1, # Mbps per user
|
|
@@ -44,6 +52,7 @@ def calculate_bandwidth(users: int, usage: Dict[str, int]) -> float:
|
|
| 44 |
return round(total_bandwidth * overhead, 2)
|
| 45 |
|
| 46 |
|
|
|
|
| 47 |
final_answer = FinalAnswerTool()
|
| 48 |
#duck_duck_go_search = DuckDuckGoSearchTool()
|
| 49 |
|
|
|
|
| 24 |
"""
|
| 25 |
Calculate the recommended internet speed based on user inputs.
|
| 26 |
|
| 27 |
+
Args:
|
| 28 |
+
users (int): The total number of users requiring internet access.
|
| 29 |
+
usage (Dict[str, int]): A dictionary with usage categories as keys. Expected keys are:
|
| 30 |
+
- "browsing": Number of users browsing the web.
|
| 31 |
+
- "video_call": Number of users on video calls.
|
| 32 |
+
- "hd_streaming": Number of users streaming in HD.
|
| 33 |
+
- "4k_streaming": Number of users streaming in 4K.
|
| 34 |
+
- "gaming": Number of users gaming online.
|
| 35 |
+
- "remote_work": Number of users working remotely.
|
| 36 |
+
|
| 37 |
+
Returns:
|
| 38 |
+
float: Recommended bandwidth in Mbps to ensure smooth performance.
|
| 39 |
"""
|
| 40 |
usage_requirements = {
|
| 41 |
"browsing": 1, # Mbps per user
|
|
|
|
| 52 |
return round(total_bandwidth * overhead, 2)
|
| 53 |
|
| 54 |
|
| 55 |
+
|
| 56 |
final_answer = FinalAnswerTool()
|
| 57 |
#duck_duck_go_search = DuckDuckGoSearchTool()
|
| 58 |
|