Update app.py
Browse files
app.py
CHANGED
@@ -19,28 +19,13 @@ st.set_page_config(
|
|
19 |
# Create an instance of AgentConfig
|
20 |
agent_config = AgentConfig()
|
21 |
|
|
|
|
|
|
|
22 |
|
23 |
-
import streamlit as st
|
24 |
-
import logging
|
25 |
-
|
26 |
-
# Set up the logger
|
27 |
-
transformers_logger = logging.getLogger("transformers.file_utils")
|
28 |
-
|
29 |
-
# Load the logs from the Transformers library
|
30 |
-
logs = transformers_logger.get_logs()
|
31 |
-
|
32 |
-
# Create a Streamlit app
|
33 |
-
|
34 |
-
# Add a button to trigger the modal
|
35 |
-
st.button("Open App User Desc Modal")
|
36 |
|
37 |
-
|
38 |
-
def display_modal():
|
39 |
-
# Display the logs in a modal
|
40 |
-
st.write(logs)
|
41 |
|
42 |
-
# Add the modal to the app
|
43 |
-
st.add_modal(display_modal)
|
44 |
|
45 |
|
46 |
#######
|
|
|
19 |
# Create an instance of AgentConfig
|
20 |
agent_config = AgentConfig()
|
21 |
|
22 |
+
#####
|
23 |
+
def on_close():
|
24 |
+
print("The modal was closed!")
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
+
st.link("User Description", lambda: st.modal("User Guide", app_user_desc(), on_close))
|
|
|
|
|
|
|
28 |
|
|
|
|
|
29 |
|
30 |
|
31 |
#######
|