Using in MindSearch
1. Obtain API Key
- Open the SiliconCloud website and register an account (if you have registered, log in directly).
- After completing the registration, go to the API Key page, create a new API Key, and copy the key for future use.
2. Deploy MindSearch
-
Clone MindSearch to your local machine and install the required dependencies (refer to https://github.com/InternLM/MindSearch/blob/main/README.md).
-
Modify:
/path/to/MindSearch/mindsearch/models.py
-
Add the configuration for calling the SiliconCloud API. The configuration is as follows:
After adding this configuration, you can execute the relevant commands to start MindSearch.
- Start the backend:
- Start the frontend. Here, we use Gradio as an example. For other frontends, refer to MindSearch’s README:
python frontend/mindsearch_gradio.py
3. Upload to HuggingFace Space
We can also choose to deploy it to a HuggingFace Space.
- Create a new Space on https://huggingface.co/new-space, configure it as:
Gradio Template: Blank Hardware: CPU basic · 2 vCPU · 16GB · FREE
-
After creating the Space, go to “Settings” and set the API Key.
-
Upload the MindSearch directory, requirements.txt, and an app.py file.
The detailed content of app.py can be found at: https://huggingface.co/spaces/SmartFlowAI/MindSearch_X_SiliconFlow/blob/main/app.py