Update app_agent_config.py
Browse files- app_agent_config.py +8 -8
app_agent_config.py
CHANGED
@@ -29,16 +29,16 @@ class AgentConfig:
|
|
29 |
self.tool_checkboxes = [st.checkbox(f"{tool.name} --- {tool.description} ") for tool in tool_loader.tools]
|
30 |
|
31 |
def content_and_context(self):
|
32 |
-
|
33 |
|
34 |
-
|
35 |
|
36 |
img_file_buffer = st.file_uploader('Upload a PNG image', type='png')
|
37 |
|
38 |
if img_file_buffer is not None:
|
39 |
image_raw = Image.open(img_file_buffer)
|
40 |
#global image
|
41 |
-
|
42 |
########
|
43 |
st.image(agent_config.image)
|
44 |
|
@@ -46,35 +46,35 @@ class AgentConfig:
|
|
46 |
if uploaded_file is not None:
|
47 |
# To read file as bytes:
|
48 |
pdf_document = uploaded_file.getvalue()
|
49 |
-
|
50 |
st.write(pdf_document)
|
51 |
|
52 |
uploaded_txt_file = st.file_uploader("Choose a txt", type='txt')
|
53 |
if uploaded_txt_file is not None:
|
54 |
# To read file as bytes:
|
55 |
txt_document = uploaded_txt_file.getvalue()
|
56 |
-
|
57 |
st.write(txt_document)
|
58 |
|
59 |
uploaded_csv_file = st.file_uploader("Choose a csv", type='csv')
|
60 |
if uploaded_csv_file is not None:
|
61 |
# To read file as bytes:
|
62 |
csv_document = uploaded_csv_file.getvalue()
|
63 |
-
|
64 |
st.write(csv_document)
|
65 |
|
66 |
uploaded_csv_file = st.file_uploader("Choose audio", type='wav')
|
67 |
if uploaded_csv_file is not None:
|
68 |
# To read file as bytes:
|
69 |
csv_document = uploaded_csv_file.getvalue()
|
70 |
-
|
71 |
st.write(csv_document)
|
72 |
|
73 |
uploaded_csv_file = st.file_uploader("Choose video", type='avi')
|
74 |
if uploaded_csv_file is not None:
|
75 |
# To read file as bytes:
|
76 |
csv_document = uploaded_csv_file.getvalue()
|
77 |
-
|
78 |
st.write(csv_document)
|
79 |
|
80 |
# To convert to a string based IO:
|
|
|
29 |
self.tool_checkboxes = [st.checkbox(f"{tool.name} --- {tool.description} ") for tool in tool_loader.tools]
|
30 |
|
31 |
def content_and_context(self):
|
32 |
+
self.context = st.text_area("Context")
|
33 |
|
34 |
+
self.image = st.camera_input("Take a picture")
|
35 |
|
36 |
img_file_buffer = st.file_uploader('Upload a PNG image', type='png')
|
37 |
|
38 |
if img_file_buffer is not None:
|
39 |
image_raw = Image.open(img_file_buffer)
|
40 |
#global image
|
41 |
+
self.image = np.array(image_raw)
|
42 |
########
|
43 |
st.image(agent_config.image)
|
44 |
|
|
|
46 |
if uploaded_file is not None:
|
47 |
# To read file as bytes:
|
48 |
pdf_document = uploaded_file.getvalue()
|
49 |
+
self.document = pdf_document
|
50 |
st.write(pdf_document)
|
51 |
|
52 |
uploaded_txt_file = st.file_uploader("Choose a txt", type='txt')
|
53 |
if uploaded_txt_file is not None:
|
54 |
# To read file as bytes:
|
55 |
txt_document = uploaded_txt_file.getvalue()
|
56 |
+
self.document = txt_document
|
57 |
st.write(txt_document)
|
58 |
|
59 |
uploaded_csv_file = st.file_uploader("Choose a csv", type='csv')
|
60 |
if uploaded_csv_file is not None:
|
61 |
# To read file as bytes:
|
62 |
csv_document = uploaded_csv_file.getvalue()
|
63 |
+
self.document = csv_document
|
64 |
st.write(csv_document)
|
65 |
|
66 |
uploaded_csv_file = st.file_uploader("Choose audio", type='wav')
|
67 |
if uploaded_csv_file is not None:
|
68 |
# To read file as bytes:
|
69 |
csv_document = uploaded_csv_file.getvalue()
|
70 |
+
self.document = csv_document
|
71 |
st.write(csv_document)
|
72 |
|
73 |
uploaded_csv_file = st.file_uploader("Choose video", type='avi')
|
74 |
if uploaded_csv_file is not None:
|
75 |
# To read file as bytes:
|
76 |
csv_document = uploaded_csv_file.getvalue()
|
77 |
+
self.document = csv_document
|
78 |
st.write(csv_document)
|
79 |
|
80 |
# To convert to a string based IO:
|