Update app.py
Browse files
app.py
CHANGED
@@ -24,9 +24,6 @@ tool_checkboxes = [st.checkbox(f"Use {tool}") for tool in tools]
|
|
24 |
# Submit button
|
25 |
#submit_button = st.button("Submit")
|
26 |
|
27 |
-
# Add the callback function to the Streamlit app
|
28 |
-
submit_button = st.button("Submit", on_click=handle_submission)
|
29 |
-
|
30 |
|
31 |
# Define the callback function to handle the form submission
|
32 |
def handle_submission():
|
@@ -45,7 +42,11 @@ def handle_submission():
|
|
45 |
# outputs = agent(inputs['input_ids'], attention_mask=inputs['attention_mask'])
|
46 |
|
47 |
# Display the agent's response
|
48 |
-
|
49 |
-
|
50 |
return "done"
|
51 |
|
|
|
|
|
|
|
|
|
|
24 |
# Submit button
|
25 |
#submit_button = st.button("Submit")
|
26 |
|
|
|
|
|
|
|
27 |
|
28 |
# Define the callback function to handle the form submission
|
29 |
def handle_submission():
|
|
|
42 |
# outputs = agent(inputs['input_ids'], attention_mask=inputs['attention_mask'])
|
43 |
|
44 |
# Display the agent's response
|
45 |
+
response = agent.run(message)
|
46 |
+
st.text(f"{response:.4f}")
|
47 |
return "done"
|
48 |
|
49 |
+
|
50 |
+
# Add the callback function to the Streamlit app
|
51 |
+
submit_button = st.button("Submit", on_click=handle_submission)
|
52 |
+
|