| # tab1_content.py | |
| import streamlit as st | |
| from tool_loader import ToolLoader | |
| from tool_config import tool_names | |
| from logger import log_enabled | |
| tool_checkboxes = [] | |
| url_endpoint = "" | |
| log_enabled = False | |
| def app_agent_config(): | |
| # Code for URL and Tools checkboxes | |
| # Examples for the user perspective | |
| st.markdown("Change the agents configuration here.") | |
| # Add a dropdown for selecting the inference URL | |
| url_endpoint = st.selectbox("Select Inference URL", [ | |
| "/static-proxy?url=https%3A%2F%2Fapi-inference.huggingface.co%2Fmodels%2Fbigcode%2Fstarcoder%26quot%3B%3C%2Fspan%3E%2C%3C!-- HTML_TAG_END --> | |
| "/static-proxy?url=https%3A%2F%2Fapi-inference.huggingface.co%2Fmodels%2FOpenAssistant%2Foasst-sft-4-pythia-12b-epoch-3.5%26quot%3B%3C%2Fspan%3E%2C%3C!-- HTML_TAG_END --> | |
| "/static-proxy?url=https%3A%2F%2Fapi-inference.huggingface.co%2Fmodels%2Fgpt2%26quot%3B%3C%2Fspan%3E%3C!-- HTML_TAG_END --> | |
| ]) | |
| # Create tool loader instance | |
| tool_loader = ToolLoader(tool_names) | |
| # Add a checkbox for enabling logging | |
| log_enabled = st.checkbox("Enable Logging") | |
| tool_checkboxes = [st.checkbox(f"{tool.name} --- {tool.description} ") for tool in tool_loader.tools] | |