Spaces:
Build error
Build error
File size: 2,657 Bytes
34b8b49 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# LLaMA-Omni Setup Instructions
This repository contains the code structure for deploying LLaMA-Omni on Gradio. The actual model files will be downloaded automatically during deployment.
## Repository Structure
```
llama-omni/
βββ app.py # Main application entry point
βββ app_gradio_spaces.py # Entry point for Gradio Spaces
βββ check_setup.py # Checks if the environment is properly set up
βββ cog.yaml # Configuration for Cog (container deployment)
βββ gradio_app.py # Simplified Gradio app for testing
βββ predict.py # Predictor for Cog deployment
βββ pyproject.toml # Project configuration
βββ requirements.txt # Dependencies for pip
βββ README.md # Project documentation
βββ SETUP_INSTRUCTIONS.md # This file
βββ omni_speech/ # Main package
βββ __init__.py
βββ infer/ # Inference code
β βββ __init__.py
β βββ examples/ # Example inputs
β β βββ example.json
β βββ inference.py # Inference logic
β βββ run.sh # Script for running inference
βββ serve/ # Serving code
βββ __init__.py
βββ controller.py # Controller for managing workers
βββ model_worker.py # Worker for serving the model
βββ gradio_web_server.py # Gradio web interface
```
## Deployment Options
1. **Gradio Spaces**:
- Connect this repository to a Gradio Space
- The application will automatically download required models
- Use `app_gradio_spaces.py` as the entry point
2. **Local Deployment**:
- Clone this repository
- Install dependencies: `pip install -r requirements.txt`
- Run the application: `python app.py`
3. **Container Deployment with Cog**:
- Install Cog: `curl -o /usr/local/bin/cog -L https://github.com/replicate/cog/releases/latest/download/cog_`uname -s`_`uname -m``
- Build the container: `cog build`
- Run the container: `cog predict -i [email protected]`
## Important Notes
- The actual model files are not included in this repository
- During deployment, the application will download:
- Whisper speech recognition model
- LLaMA-Omni model (simulated in this setup)
- HiFi-GAN vocoder
## Testing the Setup
Run the setup check script to verify your environment:
```bash
python check_setup.py
```
This will check for required directories, files, and Python packages. |