File size: 1,268 Bytes
fdfb0c4 6052994 1c5a6c6 365d369 934d9a2 17e8776 1c5a6c6 cddf298 58bb7f3 e8f0d97 f259d93 944514e b671676 944514e 1466171 346bac9 f033509 1c5a6c6 f033509 b671676 346bac9 944514e 365d369 1c5a6c6 365d369 944514e c00873c 1c5a6c6 c00873c 1c5a6c6 944514e c00873c 1c5a6c6 934d9a2 365d369 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
import streamlit as st
from tool_loader import ToolLoader
from app_user_desc import app_user_desc
from app_dev_desc import app_dev_desc
from logger import log_response
from logger import log_enabled
from app_chat import app_chat
from app_agent_config import AgentConfig
# Create an instance of AgentConfig
agent_config = AgentConfig()
# Declare global variable
st.title("Hugging Face Agent and tools")
## LB https://huggingface.co/spaces/qiantong-xu/toolbench-leaderboard
st.markdown("Welcome to the Hugging Face Agent and Tools app! This app allows you to interact with various tools using the Hugging Face API.")
# Create a page with tabs
tabs = st.tabs(["Chat", "URL, Tools and logging", "User Description", "Developers"])
# Tab 1: Chat
with tabs[0]:
# Code for URL and Tools checkboxes
#chat_description()
# Examples for the user perspective
st.markdown("Stat to chat. e.g. Generate an image of a boat. This will make the agent use the tool text2image to generate an image.")
# Tab 2: URL and Tools
with tabs[1]:
#
agent_config.configure()
# Tab 3: User Description
#with tabs[2]:
#
# app_user_desc()
# Tab 4: Developers
#with tabs[3]:
# app_dev_desc()
#app_chat()
app_chat(agent_config) |