Spaces:
Sleeping
Sleeping
Refactored Gradio UI text.
Browse files- assets/html.py +20 -0
- rss_client.py +5 -8
assets/html.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''Collection of HTML elements for Gradio interface.'''
|
| 2 |
+
|
| 3 |
+
TITLE = (
|
| 4 |
+
'''
|
| 5 |
+
<center>
|
| 6 |
+
<h1>Agentic RSS reader</h1>
|
| 7 |
+
</center>
|
| 8 |
+
'''
|
| 9 |
+
)
|
| 10 |
+
|
| 11 |
+
DESCRIPTION = (
|
| 12 |
+
'''
|
| 13 |
+
<p>Uses sister Space
|
| 14 |
+
<a href='https://huggingface.co/spaces/Agents-MCP-Hackathon/rss-mcp-server'>
|
| 15 |
+
RSS feed reader</a> via MCP. Click 'Connect to MCP server' to get started.
|
| 16 |
+
Check out the <a href='https://github.com/gperdrizet/MCP-hackathon/tree/main'>
|
| 17 |
+
main project repo on GitHub</a>. Both Spaces by
|
| 18 |
+
<a href=https://www.linkedin.com/in/gperdrizet/'>George Perdrizet</a>.</p>
|
| 19 |
+
'''
|
| 20 |
+
)
|
rss_client.py
CHANGED
|
@@ -6,6 +6,7 @@ from pathlib import Path
|
|
| 6 |
from logging.handlers import RotatingFileHandler
|
| 7 |
|
| 8 |
import gradio as gr
|
|
|
|
| 9 |
import client.gradio_functions as gradio_funcs
|
| 10 |
import client.interface as interface
|
| 11 |
from client.mcp_client import MCPClientWrapper
|
|
@@ -66,14 +67,10 @@ async def send_message(message: str, chat_history: list) -> str:
|
|
| 66 |
|
| 67 |
|
| 68 |
with gr.Blocks(title='MCP RSS client') as demo:
|
| 69 |
-
gr.
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
via MCP. Click 'Connect to MCP server' to get started. Check out the
|
| 74 |
-
[main project repo on GitHub](https://github.com/gperdrizet/MCP-hackathon/tree/main).
|
| 75 |
-
Both Spaces by [George Perdrizet](https://www.linkedin.com/in/gperdrizet/).
|
| 76 |
-
''')
|
| 77 |
|
| 78 |
# MCP connection/tool dump
|
| 79 |
connect_btn = gr.Button('Connect to MCP server')
|
|
|
|
| 6 |
from logging.handlers import RotatingFileHandler
|
| 7 |
|
| 8 |
import gradio as gr
|
| 9 |
+
import assets.html as html
|
| 10 |
import client.gradio_functions as gradio_funcs
|
| 11 |
import client.interface as interface
|
| 12 |
from client.mcp_client import MCPClientWrapper
|
|
|
|
| 67 |
|
| 68 |
|
| 69 |
with gr.Blocks(title='MCP RSS client') as demo:
|
| 70 |
+
with gr.Row():
|
| 71 |
+
gr.HTML(html.TITLE)
|
| 72 |
+
|
| 73 |
+
gr.Markdown(html.DESCRIPTION)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
# MCP connection/tool dump
|
| 76 |
connect_btn = gr.Button('Connect to MCP server')
|