Spaces:
Running
Running
Bismay
commited on
Commit
·
6b6fa2c
1
Parent(s):
c139e1b
Update readme for more instructions / Update gradio interface for docs
Browse files
README.md
CHANGED
|
@@ -83,7 +83,23 @@ Example configuration for a client (like Cline) that supports SSE:
|
|
| 83 |
}
|
| 84 |
```
|
| 85 |
|
| 86 |
-
*Note: If your MCP client does not directly support SSE-based servers (like
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
### Connecting to the Hosted Server on Hugging Face Spaces
|
| 89 |
|
|
|
|
| 83 |
}
|
| 84 |
```
|
| 85 |
|
| 86 |
+
*Note: If your MCP client does not directly support SSE-based servers (like Claude Desktop), you may need to use a tool like `mcp-remote` as an intermediary.*
|
| 87 |
+
|
| 88 |
+
In those cases, you can use a tool such as mcp-remote. First install Node.js. Then, add the following to your own MCP Client config:
|
| 89 |
+
|
| 90 |
+
```json
|
| 91 |
+
{
|
| 92 |
+
"mcpServers": {
|
| 93 |
+
"gradio": {
|
| 94 |
+
"command": "npx",
|
| 95 |
+
"args": [
|
| 96 |
+
"mcp-remote",
|
| 97 |
+
"http://127.0.0.1:7860/gradio_api/mcp/sse"
|
| 98 |
+
]
|
| 99 |
+
}
|
| 100 |
+
}
|
| 101 |
+
}
|
| 102 |
+
```
|
| 103 |
|
| 104 |
### Connecting to the Hosted Server on Hugging Face Spaces
|
| 105 |
|
app.py
CHANGED
|
@@ -83,13 +83,33 @@ def transcribe_url(url):
|
|
| 83 |
|
| 84 |
|
| 85 |
with gr.Blocks() as app:
|
| 86 |
-
gr.Markdown("#
|
| 87 |
-
gr.Markdown(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
url_input = gr.Textbox(label="Enter Audio/Video URL", placeholder="e.g., https://www.youtube.com/watch?v=dQw4w9WgXcQ")
|
| 90 |
transcribe_button = gr.Button("Transcribe")
|
| 91 |
|
| 92 |
-
gr.Markdown("Provide a URL to transcribe audio or video.")
|
| 93 |
|
| 94 |
transcription_output = gr.Textbox(label="Transcription", lines=10)
|
| 95 |
|
|
|
|
| 83 |
|
| 84 |
|
| 85 |
with gr.Blocks() as app:
|
| 86 |
+
gr.Markdown("# <center>gradio-transcript-mcp: Transcribe Audio/Video from URL</center>")
|
| 87 |
+
gr.Markdown(
|
| 88 |
+
"""
|
| 89 |
+
This application functions as an MCP server that transcribes audio or video from a URL using OpenAI's Whisper model.
|
| 90 |
+
It downloads the media, converts it to WAV, and performs the transcription.
|
| 91 |
+
|
| 92 |
+
### Connecting to the Hosted Server
|
| 93 |
+
To connect your MCP client that supports SSE to this hosted server, add a configuration entry similar to this:
|
| 94 |
+
|
| 95 |
+
```json
|
| 96 |
+
{
|
| 97 |
+
"mcpServers": {
|
| 98 |
+
"gradio-transcript": {
|
| 99 |
+
"url": "https://bismay-gradio-transcript-mcp.hf.space/gradio_api/mcp/sse"
|
| 100 |
+
}
|
| 101 |
+
}
|
| 102 |
+
}
|
| 103 |
+
```
|
| 104 |
+
|
| 105 |
+
For more details on setup and MCP usage, see the [README.md](README.md).
|
| 106 |
+
"""
|
| 107 |
+
)
|
| 108 |
|
| 109 |
url_input = gr.Textbox(label="Enter Audio/Video URL", placeholder="e.g., https://www.youtube.com/watch?v=dQw4w9WgXcQ")
|
| 110 |
transcribe_button = gr.Button("Transcribe")
|
| 111 |
|
| 112 |
+
gr.Markdown("Provide a URL to transcribe audio or YT video.")
|
| 113 |
|
| 114 |
transcription_output = gr.Textbox(label="Transcription", lines=10)
|
| 115 |
|