arre99 commited on
Commit
d07810d
·
1 Parent(s): d69ce5a

fix removed iface and tidied up the markdow a bit

Browse files
Files changed (1) hide show
  1. app.py +43 -4
app.py CHANGED
@@ -99,7 +99,7 @@ with gr.Blocks() as markdown_tab:
99
  <br>
100
  This application leverages the FastF1 library to provide detailed insights into Formula 1 races, drivers, and teams.
101
 
102
- ## Available Tools
103
 
104
  ### Championship Standings
105
  - **Driver Championship**: Track driver positions, points, and wins
@@ -113,12 +113,52 @@ with gr.Blocks() as markdown_tab:
113
  ### Driver & Team Data
114
  - **Driver Info**: View detailed driver profiles and statistics
115
  - **Track Visualizations**: Explore interactive track maps with speed, gear, and corner data
 
116
 
117
  ## Usage
118
- Use the tabs above to navigate between different sections and explore the wealth of F1 data available at your fingertips.
119
- """)
120
 
 
 
 
121
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
 
123
 
124
 
@@ -131,7 +171,6 @@ named_interfaces = {
131
  "Track Visualizations": iface_track_visualization,
132
  "Session Results": iface_session_results,
133
  "Driver Info": iface_driver_info,
134
- "Test": iface_test
135
  }
136
 
137
  # Tab names and interfaces
 
99
  <br>
100
  This application leverages the FastF1 library to provide detailed insights into Formula 1 races, drivers, and teams.
101
 
102
+ ## Available Tools in Gradio UI
103
 
104
  ### Championship Standings
105
  - **Driver Championship**: Track driver positions, points, and wins
 
113
  ### Driver & Team Data
114
  - **Driver Info**: View detailed driver profiles and statistics
115
  - **Track Visualizations**: Explore interactive track maps with speed, gear, and corner data
116
+
117
 
118
  ## Usage
 
 
119
 
120
+ There are different ways to interact with the MCP server:
121
+
122
+ 1) (recommended) Add the MCP server to your `mcp.json` file. This is the most user-friendly way to interact with the MCP server. See the section below for the config file.
123
 
124
+ 2) (not recommended) One can establish an MCP client by running `mcp_client.py` locally. This client is connected to the MCP server hosted on HuggingFace spaces. Warning: I personally had trouble getting this to work properly using local Ollama models.
125
+
126
+ 3) (limited functionality) One can also use the Gradio interface directly to interact with the MCP server. However, I have limited the number of tools/functions available in the Gradio interface due to there not being a clean and nice way to implement the `OpenF1` tools in Gradio (literally just direct HTTP endpoints with tons of filters xD).
127
+
128
+
129
+ ## MCP json configuration
130
+
131
+ For MCP clients that support SSE transport (For Claude desktop see below), the following configuration can be used in your `mcp.json` file (or its equivalent):
132
+
133
+ ```json
134
+ {
135
+ "mcpServers": {
136
+ "gradio": {
137
+ "url": "https://agents-mcp-hackathon-f1-mcp-server.hf.space/gradio_api/mcp/sse"
138
+ }
139
+ }
140
+ }
141
+ ```
142
+
143
+ For Claude Desktop, the following configuration can instead be used, but make sure you have Node.js installed:
144
+
145
+ ```json
146
+ {
147
+ "mcpServers": {
148
+ "gradio": {
149
+ "command": "npx",
150
+ "args": [
151
+ "mcp-remote",
152
+ "https://agents-mcp-hackathon-f1-mcp-server.hf.space/gradio_api/mcp/sse",
153
+ "--transport",
154
+ "sse-only"
155
+ ]
156
+ }
157
+ }
158
+ }
159
+ ```
160
+
161
+ """)
162
 
163
 
164
 
 
171
  "Track Visualizations": iface_track_visualization,
172
  "Session Results": iface_session_results,
173
  "Driver Info": iface_driver_info,
 
174
  }
175
 
176
  # Tab names and interfaces