Spaces:
Runtime error
Runtime error
| # First, completely uninstall any existing packages that might conflict | |
| pip uninstall -y gradio gradio-client websockets | |
| # Upgrade pip to the latest version | |
| pip install --upgrade pip | |
| # Install compatible versions in a specific order | |
| pip install websockets==10.4 | |
| pip install gradio==3.35.0 | |
| pip install gradio-client==0.5.0 | |
| # Now install the rest of the requirements | |
| pip install PyPDF2==3.0.1 | |
| pip install langchain==0.0.340 | |
| pip install faiss-cpu==1.7.4 | |
| pip install sentence-transformers==2.3.0 | |
| pip install zhipuai>=2.1.0 | |
| pip install transformers==4.35.2 | |
| pip install torch==2.1.0 | |
| pip install huggingface-hub==0. | |
| echo "Verifying installations..." | |
| python -c "import gradio; print('Gradio version:', gradio.__version__)" | |
| python -c "import websockets; print('Websockets version:', websockets.__version__)" | |
| python -c "import sentence_transformers; print('Sentence-transformers version:', sentence_transformers.__version__)" |