Spaces:
Sleeping
Sleeping
Update pyfolio/mcp_output/mcp_plugin/mcp_service.py
Browse files
pyfolio/mcp_output/mcp_plugin/mcp_service.py
CHANGED
|
@@ -39,13 +39,10 @@ mcp = FastMCP("pyfolio_service")
|
|
| 39 |
|
| 40 |
def _save_plot_as_base64(plt, plot_name):
|
| 41 |
"""Save plot as base64 string and to file"""
|
| 42 |
-
import base64
|
| 43 |
from io import BytesIO
|
| 44 |
-
import datetime
|
| 45 |
-
import os
|
| 46 |
|
| 47 |
# Generate timestamp for unique filename
|
| 48 |
-
timestamp = datetime.
|
| 49 |
filename = f"{plot_name}_{timestamp}.png"
|
| 50 |
|
| 51 |
# Save to current working directory instead of /tmp
|
|
|
|
| 39 |
|
| 40 |
def _save_plot_as_base64(plt, plot_name):
|
| 41 |
"""Save plot as base64 string and to file"""
|
|
|
|
| 42 |
from io import BytesIO
|
|
|
|
|
|
|
| 43 |
|
| 44 |
# Generate timestamp for unique filename
|
| 45 |
+
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
| 46 |
filename = f"{plot_name}_{timestamp}.png"
|
| 47 |
|
| 48 |
# Save to current working directory instead of /tmp
|