nuera / README.md
akshatOP's picture
Initial upload of TTS, SST, and LLM models with API
2f38e4a

A newer version of the Gradio SDK is available: 5.20.0

Upgrade
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

  1. Clone the repository to your Hugging Face Space.
  2. Install dependencies: pip install -r requirements.txt.
  3. Prepare models:
    • TTS: Run download_and_finetune_tts.py externally, then upload ./tts_finetuned to models/tts_model. If not uploaded, uses parler-tts/parler-tts-mini-v1.
    • SST: Run download_and_finetune_sst.py externally, then upload ./sst_finetuned to models/sst_model. If not uploaded, uses facebook/wav2vec2-base-960h.
    • LLM: Download a Llama GGUF file (e.g., from TheBloke/Llama-2-7B-GGUF on Hugging Face Hub) and upload to models/llama.gguf. Required for LLM to work.
  4. 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
  • 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

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.