sims2k commited on
Commit
6e948ad
1 Parent(s): 4033364

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -7,10 +7,10 @@
7
  | - Import Python | | - Define interface | | - Transcribe audio | | - XTTS model generates |
8
  | libraries | | components | | to text using | | spoken response from |
9
  | - Initialize models: |--------> - Configure audio and |------->| Faster Whisper ASR |------->| LLM's text response |
10
- | Whisper, Mistral, | | text interaction | | - Transcribed text | | |
11
  | XTTS | | - Launch interface | | is added to | | |
12
  | | | | | chatbot's history | | |
13
- | | | | | - Mistral LLM | | |
14
  | | | | | processes chatbot | | |
15
  | | | | | history to generate | | |
16
  | | | | | response | | |
@@ -48,7 +48,7 @@ whisper_model = WhisperModel("large-v3", device="cuda", compute_type="float16")
48
  print("Loading Saul-Instruct-v1-GGUF.Q4_K_M")
49
  hf_hub_download(repo_id="MaziyarPanahi/Saul-Instruct-v1-GGUF", local_dir=".", filename="Saul-Instruct-v1.Q4_K_M.gguf")
50
  saul_model_path="./Saul-Instruct-v1.Q4_K_M.gguf"
51
- saul_instruct_llm = Llama(model_path=saul_model_path,n_gpu_layers=35,max_new_tokens=256, context_window=4096, n_ctx=4096, n_batch=128,verbose=False)
52
 
53
  # Load XTTS Model
54
  print("Loading XTTS model")
@@ -170,7 +170,6 @@ with gr.Blocks(title="Voice chat with Saul-Instruct-v1-GGUF") as demo:
170
  It relies on the following models :
171
  - Speech to Text Model: [Faster-Whisper-large-v3](https://huggingface.co/Systran/faster-whisper-large-v3) an ASR model, to transcribe recorded audio to text.
172
  - Legal Large Language Model: [MaziyarPanahi/Saul-Instruct-v1-GGUF](https://huggingface.co/MaziyarPanahi/Saul-Instruct-v1-GGUF/blob/main/Saul-Instruct-v1.Q4_K_M.gguf) a LLM to generate legal chatbot responses.
173
- - Large Language Model: [Mistral-7b-instruct-v0.1-quantized](https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF) a LLM to generate the chatbot responses.
174
  - Text to Speech Model: [XTTS-v2](https://huggingface.co/spaces/coqui/xtts) a TTS model, to generate the voice of the chatbot.
175
 
176
  Note:
 
7
  | - Import Python | | - Define interface | | - Transcribe audio | | - XTTS model generates |
8
  | libraries | | components | | to text using | | spoken response from |
9
  | - Initialize models: |--------> - Configure audio and |------->| Faster Whisper ASR |------->| LLM's text response |
10
+ | Whisper, SaulLM, | | text interaction | | - Transcribed text | | |
11
  | XTTS | | - Launch interface | | is added to | | |
12
  | | | | | chatbot's history | | |
13
+ | | | | | - SaulLM LLM | | |
14
  | | | | | processes chatbot | | |
15
  | | | | | history to generate | | |
16
  | | | | | response | | |
 
48
  print("Loading Saul-Instruct-v1-GGUF.Q4_K_M")
49
  hf_hub_download(repo_id="MaziyarPanahi/Saul-Instruct-v1-GGUF", local_dir=".", filename="Saul-Instruct-v1.Q4_K_M.gguf")
50
  saul_model_path="./Saul-Instruct-v1.Q4_K_M.gguf"
51
+ saul_instruct_llm = Llama(model_path=saul_model_path,n_gpu_layers=35,max_new_tokens=256, context_window=16384, n_ctx=16384, n_batch=128,verbose=False)
52
 
53
  # Load XTTS Model
54
  print("Loading XTTS model")
 
170
  It relies on the following models :
171
  - Speech to Text Model: [Faster-Whisper-large-v3](https://huggingface.co/Systran/faster-whisper-large-v3) an ASR model, to transcribe recorded audio to text.
172
  - Legal Large Language Model: [MaziyarPanahi/Saul-Instruct-v1-GGUF](https://huggingface.co/MaziyarPanahi/Saul-Instruct-v1-GGUF/blob/main/Saul-Instruct-v1.Q4_K_M.gguf) a LLM to generate legal chatbot responses.
 
173
  - Text to Speech Model: [XTTS-v2](https://huggingface.co/spaces/coqui/xtts) a TTS model, to generate the voice of the chatbot.
174
 
175
  Note: