A newer version of the Gradio SDK is available:
5.20.0
metadata
title: Nuera
emoji: π
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.19.0
app_file: app.py
pinned: false
Check out the configuration reference at https://huggingface.co./docs/hub/spaces-config-reference
My AI Models Space
This Hugging Face Space hosts TTS, SST, and LLM models with API endpoints.
Setup
- Clone the repository to your Hugging Face Space.
- Install dependencies:
pip install -r requirements.txt
. - Prepare models:
- TTS: Run
download_and_finetune_tts.py
externally, then upload./tts_finetuned
tomodels/tts_model
. If not uploaded, usesparler-tts/parler-tts-mini-v1
. - SST: Run
download_and_finetune_sst.py
externally, then upload./sst_finetuned
tomodels/sst_model
. If not uploaded, usesfacebook/wav2vec2-base-960h
. - LLM: Download a Llama GGUF file (e.g., from
TheBloke/Llama-2-7B-GGUF
on Hugging Face Hub) and upload tomodels/llama.gguf
. Required for LLM to work.
- TTS: Run
- Deploy: Push to your Space, and it will run
app.py
.
API Endpoints
POST /tts
- Request:
{"text": "Your text here"}
- Response: Audio file (WAV)
- Example:
curl -X POST -H "Content-Type: application/json" -d '{"text":"Hello"}' http://your-space.hf.space/tts --output output.wav
- Request:
POST /sst
- Request: Audio file upload
- Response:
{"text": "transcribed text"}
- Example:
curl -X POST -F "[email protected]" http://your-space.hf.space/sst
POST /llm
- Request:
{"prompt": "Your prompt here"}
- Response:
{"text": "generated text"}
- Example:
curl -X POST -H "Content-Type: application/json" -d '{"prompt":"Tell me a story"}' http://your-space.hf.space/llm
- Request:
Fine-Tuning
- TTS: Edit
download_and_finetune_tts.py
with your dataset, run externally, and upload the result. - SST: Edit
download_and_finetune_sst.py
with your dataset, run externally, and upload the result. - LLM: Llama.cpp is used for inference only. For fine-tuning, use tools like LoRA with Transformers externally, convert to GGUF, and upload.
Notes
- Ensure GGUF file for LLM is manageable (e.g., quantized versions like
llama-2-7b.Q4_K_M.gguf
). - Fine-tuning requires significant resources; perform it outside Spaces.