Spaces:
Sleeping
Sleeping
| def modify_dashboard(dashboard_html, backend_url): | |
| """Modify dashboard HTML to interact with backend""" | |
| # Update API endpoints to point to backend_url | |
| modified_html = dashboard_html.replace( | |
| "const API_ENDPOINT = '';", | |
| f"const API_ENDPOINT = '{backend_url}';" | |
| ) | |
| return modified_html | |
| def modify_chat_interface(chat_interface_html, backend_url): | |
| """Modify chat interface HTML to interact with backend""" | |
| # Update API endpoints to point to backend_url | |
| modified_html = chat_interface_html.replace( | |
| "const API_ENDPOINT = '';", | |
| f"const API_ENDPOINT = '{backend_url}';" | |
| ) | |
| return modified_html |