temp timeout function v2
Browse files- app.py +12 -1
- mcp_client.py +1 -1
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
# Local modules
|
4 |
import fastf1_tools
|
@@ -106,7 +107,16 @@ iface_constructor_info = gr.Interface(
|
|
106 |
description="Get background information about a specific constructor"
|
107 |
)
|
108 |
|
109 |
-
def timeout_test(seconds: int):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
time.sleep(seconds)
|
111 |
return f"Timeout for {seconds} seconds completed"
|
112 |
|
@@ -185,6 +195,7 @@ named_interfaces = {
|
|
185 |
"Driver Info": iface_driver_info,
|
186 |
"Constructor Info": iface_constructor_info,
|
187 |
"OpenF1 Tools": openf1_tools_tab(),
|
|
|
188 |
}
|
189 |
|
190 |
# Tab names and interfaces
|
|
|
1 |
import gradio as gr
|
2 |
+
import time
|
3 |
|
4 |
# Local modules
|
5 |
import fastf1_tools
|
|
|
107 |
description="Get background information about a specific constructor"
|
108 |
)
|
109 |
|
110 |
+
def timeout_test(seconds: int) -> str:
|
111 |
+
"""
|
112 |
+
A simple function that sleeps for the given amount of seconds.
|
113 |
+
|
114 |
+
Args:
|
115 |
+
seconds (int): The amount of seconds to sleep
|
116 |
+
|
117 |
+
Returns:
|
118 |
+
str: A message indicating the timeout is completed
|
119 |
+
"""
|
120 |
time.sleep(seconds)
|
121 |
return f"Timeout for {seconds} seconds completed"
|
122 |
|
|
|
195 |
"Driver Info": iface_driver_info,
|
196 |
"Constructor Info": iface_constructor_info,
|
197 |
"OpenF1 Tools": openf1_tools_tab(),
|
198 |
+
"Timeout Testing": iface_timeout_testing
|
199 |
}
|
200 |
|
201 |
# Tab names and interfaces
|
mcp_client.py
CHANGED
@@ -17,7 +17,7 @@ def agent_chat(message: str, history: list):
|
|
17 |
|
18 |
if __name__ == "__main__":
|
19 |
|
20 |
-
list_tools =
|
21 |
local_model = True # If you have Ollama installed, set this to True
|
22 |
|
23 |
try:
|
|
|
17 |
|
18 |
if __name__ == "__main__":
|
19 |
|
20 |
+
list_tools = True # Set to True to only list tools (used for debugging)
|
21 |
local_model = True # If you have Ollama installed, set this to True
|
22 |
|
23 |
try:
|