Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -781,6 +781,16 @@ shared_state = {"project_desc_table": pd.DataFrame(), "task_analysis_txt": "", "
|
|
781 |
|
782 |
# Button Action: Fetch State
|
783 |
def fetch_updated_state():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
784 |
response = requests.get("http://localhost:5000/state")
|
785 |
# Check the status code and the raw response
|
786 |
if response.status_code == 200:
|
|
|
781 |
|
782 |
# Button Action: Fetch State
|
783 |
def fetch_updated_state():
|
784 |
+
# Iterating and logging the shared state
|
785 |
+
for key, value in shared_state.items():
|
786 |
+
if isinstance(value, pd.DataFrame):
|
787 |
+
logger.debug(f"{key}: DataFrame:\n{value.to_string()}")
|
788 |
+
elif isinstance(value, dict):
|
789 |
+
logger.debug(f"{key}: Dictionary: {value}")
|
790 |
+
elif isinstance(value, str):
|
791 |
+
logger.debug(f"{key}: String: {value}")
|
792 |
+
else:
|
793 |
+
logger.debug(f"{key}: Unsupported type: {value}")
|
794 |
response = requests.get("http://localhost:5000/state")
|
795 |
# Check the status code and the raw response
|
796 |
if response.status_code == 200:
|