llama-omni / SETUP_INSTRUCTIONS.md
marcosremar2's picture
dfdfdf
34b8b49
# 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.