MindSearch
MindSearch copied to clipboard
Create updated_mindsearch_gradio.py
Removed Global Variables: Eliminated unnecessary global variable usage in favor of function parameters.
Added Error Handling: Wrapped the requests.post call in a try-except block for error handling.
Simplified reset_memory: Updated the function to directly clear the global variables.
Improved Readability: Made various changes for better readability, including function docstrings and improved formatting.
Cleaned Up Logic: Refactored format_response and streaming functions for clarity.