crcdng
commited on
Commit
·
13860f3
1
Parent(s):
3fca8bc
improvements
Browse files- app.py +4 -4
- doomsweek_mcp_server.py +2 -0
app.py
CHANGED
|
@@ -215,14 +215,14 @@ def gradio_interface():
|
|
| 215 |
with gr.Row():
|
| 216 |
title = gr.HTML(title_html)
|
| 217 |
|
| 218 |
-
gr.Markdown("**Note: this space was made for the MCP Hackathon in June 2025 and will stop working when the connected credits run out. Further development of this agent will take place on my [Huggingface Profile](https://huggingface.co/crcdng). Thanks for trying
|
| 219 |
|
| 220 |
with gr.Row():
|
| 221 |
title = gr.Image("space_svgrepo_com_small.jpg")
|
| 222 |
|
| 223 |
gr.Markdown("What is more important than to know one's own end? This space will answer ultimate questions. In particular will you know if humanity will survive the next 7 days. To do that, **first connect via MCP to the DOOMSWEEK MCP Server**. The server fetches data from the NASA Near Earth Object Web Service and checks if ... we are doomed. Anthropic's Claude will give you the result in nice words, hopefully. In other words, before an Asteroid will smash this planet you will learn it here first. Nice, isn't it? You will have enough time to enjoy a scoop of your favourate ice cream, walk the dog a last time and sell all tech stocks. You won't need them, promised. Try it out and **chat with the assistant (examples below)**.")
|
| 224 |
|
| 225 |
-
with gr.Row(equal_height=
|
| 226 |
with gr.Column(scale=4):
|
| 227 |
server_path = gr.Textbox(
|
| 228 |
label="Server Script Path",
|
|
@@ -265,7 +265,7 @@ def gradio_interface():
|
|
| 265 |
|
| 266 |
if __name__ == "__main__":
|
| 267 |
if not os.getenv("ANTHROPIC_API_KEY"):
|
| 268 |
-
print("Warning: ANTHROPIC_API_KEY not found in environment. Please set it in your .env file.")
|
| 269 |
-
|
| 270 |
interface = gradio_interface()
|
| 271 |
interface.launch(debug=True, allowed_paths=["monitorica.bold.otf", "agent_a.jpg", "agent_b.jpg", "space_svgrepo_com_small.jpg", "styles.css"],)
|
|
|
|
| 215 |
with gr.Row():
|
| 216 |
title = gr.HTML(title_html)
|
| 217 |
|
| 218 |
+
gr.Markdown("**Note: this space was made for the MCP Hackathon in June 2025 and will stop working when the connected credits run out. Further development of this agent will take place on my [Huggingface Profile](https://huggingface.co/crcdng). Thanks for trying out Doomsweek Assistant.**")
|
| 219 |
|
| 220 |
with gr.Row():
|
| 221 |
title = gr.Image("space_svgrepo_com_small.jpg")
|
| 222 |
|
| 223 |
gr.Markdown("What is more important than to know one's own end? This space will answer ultimate questions. In particular will you know if humanity will survive the next 7 days. To do that, **first connect via MCP to the DOOMSWEEK MCP Server**. The server fetches data from the NASA Near Earth Object Web Service and checks if ... we are doomed. Anthropic's Claude will give you the result in nice words, hopefully. In other words, before an Asteroid will smash this planet you will learn it here first. Nice, isn't it? You will have enough time to enjoy a scoop of your favourate ice cream, walk the dog a last time and sell all tech stocks. You won't need them, promised. Try it out and **chat with the assistant (examples below)**.")
|
| 224 |
|
| 225 |
+
with gr.Row(equal_height=False):
|
| 226 |
with gr.Column(scale=4):
|
| 227 |
server_path = gr.Textbox(
|
| 228 |
label="Server Script Path",
|
|
|
|
| 265 |
|
| 266 |
if __name__ == "__main__":
|
| 267 |
if not os.getenv("ANTHROPIC_API_KEY"):
|
| 268 |
+
print("Warning: ANTHROPIC_API_KEY not found in environment. Please set it in your .env file or huggingface settings.")
|
| 269 |
+
|
| 270 |
interface = gradio_interface()
|
| 271 |
interface.launch(debug=True, allowed_paths=["monitorica.bold.otf", "agent_a.jpg", "agent_b.jpg", "space_svgrepo_com_small.jpg", "styles.css"],)
|
doomsweek_mcp_server.py
CHANGED
|
@@ -80,6 +80,8 @@ async def calc_doom_probability():
|
|
| 80 |
# demo.launch(mcp_server=True)
|
| 81 |
|
| 82 |
if __name__ == "__main__":
|
|
|
|
|
|
|
| 83 |
# NOTE the NASA API is provided by the client via env server parameters
|
| 84 |
nasa_api_key = os.getenv("NASA_API_KEY")
|
| 85 |
mcp.run(transport='stdio')
|
|
|
|
| 80 |
# demo.launch(mcp_server=True)
|
| 81 |
|
| 82 |
if __name__ == "__main__":
|
| 83 |
+
if not os.getenv("NASA_API_KEY"):
|
| 84 |
+
print("Warning: NASA_API_KEY not found in environment. Please set it in your .env file or huggingface settings.")
|
| 85 |
# NOTE the NASA API is provided by the client via env server parameters
|
| 86 |
nasa_api_key = os.getenv("NASA_API_KEY")
|
| 87 |
mcp.run(transport='stdio')
|