Chris4K commited on
Commit
f3a9da9
Β·
verified Β·
1 Parent(s): ecfa0bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -25
app.py CHANGED
@@ -15,30 +15,31 @@ from app_agent_config import AgentConfig
15
  agent_config = AgentConfig()
16
 
17
 
18
- # Declare global variable
19
 
20
  st.set_page_config(
21
- page_title="Transformers can realy do anything...",
22
  page_icon="πŸ‘‹",
23
  )
24
 
25
- st.title("Hugging Face Agent and tools")
26
 
27
  ## LB https://huggingface.co/spaces/qiantong-xu/toolbench-leaderboard
28
 
29
- 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. CustomTransformers can do anything \nπŸ€ͺπŸ€—πŸ˜„πŸ€—πŸ€ͺ.")
30
 
31
  #######
32
 
33
  import pandas as pd
34
  from io import StringIO
35
  with st.sidebar:
 
 
 
36
  with st.expander("Configure the agent and activate tools"):
37
 
38
- st.header("Set Tools and Option. Context and Content.")
39
  agent_config.configure()
40
 
41
- with st.expander("Set content and context"):
42
 
43
  agent_config.context = st.text_area("Context")
44
 
@@ -100,29 +101,13 @@ with st.sidebar:
100
  dataframe = pd.read_csv(uploaded_file)
101
  st.write(dataframe)
102
 
103
-
104
-
105
  # Create a page with tabs
106
  tabs = st.tabs(["Chat","User Description"])
107
- #tabs = st.tabs(["Chat", "URL, Tools and logging", "User Description", "Developers"])
108
-
109
- # Tab 1: Chat
110
- with tabs[0]:
111
-
112
- # Code for URL and Tools checkboxes
113
- #chat_description()
114
- # Examples for the user perspective
115
  st.markdown("Start to chat. e.g. Generate an image of a boat. This will make the agent use the tool text2image to generate an image. Set content, context, Inference URL , tools and logging in the sidebar.")
116
 
117
-
118
- # Tab 3: User Description
119
  with tabs[1]:
120
- #
121
  app_user_desc()
122
-
123
- # Tab 4: Developers
124
- #with tabs[3]:
125
- # app_dev_desc()
126
-
127
- #app_chat()
128
  app_chat(agent_config)
 
15
  agent_config = AgentConfig()
16
 
17
 
 
18
 
19
  st.set_page_config(
20
+ page_title="Custom Transformers can realy do anything...",
21
  page_icon="πŸ‘‹",
22
  )
23
 
24
+ st.title("Hugging Face Agent and Tools")
25
 
26
  ## LB https://huggingface.co/spaces/qiantong-xu/toolbench-leaderboard
27
 
28
+ st.markdown("Welcome to the Hugging Face Agent and Tools app! This app allows you to interact with various tools using the Hugging Face Inference API. CustomTransformers can do anything \nπŸ€ͺπŸ€—πŸ˜„πŸ€—πŸ€ͺ.")
29
 
30
  #######
31
 
32
  import pandas as pd
33
  from io import StringIO
34
  with st.sidebar:
35
+
36
+ st.header("Set Tools and Option. ")
37
+
38
  with st.expander("Configure the agent and activate tools"):
39
 
 
40
  agent_config.configure()
41
 
42
+ with st.expander("Set Content and Context"):
43
 
44
  agent_config.context = st.text_area("Context")
45
 
 
101
  dataframe = pd.read_csv(uploaded_file)
102
  st.write(dataframe)
103
 
 
 
104
  # Create a page with tabs
105
  tabs = st.tabs(["Chat","User Description"])
106
+
107
+ with tabs[0]:
 
 
 
 
 
 
108
  st.markdown("Start to chat. e.g. Generate an image of a boat. This will make the agent use the tool text2image to generate an image. Set content, context, Inference URL , tools and logging in the sidebar.")
109
 
 
 
110
  with tabs[1]:
 
111
  app_user_desc()
112
+
 
 
 
 
 
113
  app_chat(agent_config)