Eniola Alese commited on
Commit
6042d86
1 Parent(s): 4312a67

add app files

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -46,9 +46,10 @@ whisper_model = WhisperModel("large-v3", device="cuda", compute_type="float16")
46
 
47
  # Load Mistral LLM
48
  print("Loading Mistral LLM")
49
- llm_model_name="mistral-7b-instruct-v0.1.Q5_K_M.gguf"
50
- hf_hub_download(repo_id="TheBloke/Mistral-7B-Instruct-v0.1-GGUF", local_dir=".", filename=llm_model_name)
51
- mistral_llm = Llama(model_path=f"./{llm_model_name}",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")
@@ -177,4 +178,4 @@ with gr.Blocks(title="Voice chat with LLM") as demo:
177
  - iOS (Iphone/Ipad) devices may not experience voice due to autoplay being disabled on these devices by Vendor"""
178
  gr.Markdown(FOOTNOTE)
179
  demo.load(block=None, fn=generate_speech, inputs=[chatbot,chatbot_voice, gr.State(value=True)], outputs=[sentence, chatbot, audio_playback])
180
- demo.queue().launch(debug=True,share=True)
 
46
 
47
  # Load Mistral LLM
48
  print("Loading Mistral LLM")
49
+ hf_hub_download(repo_id="TheBloke/Mistral-7B-Instruct-v0.1-GGUF", local_dir=".", filename="mistral-7b-instruct-v0.1.Q5_K_M.gguf")
50
+ mistral_model_path="./mistral-7b-instruct-v0.1.Q5_K_M.gguf"
51
+ mistral_llm = Llama(model_path=mistral_model_path,n_gpu_layers=35,max_new_tokens=256, context_window=4096, n_ctx=4096,n_batch=128,verbose=False)
52
+
53
 
54
  # Load XTTS Model
55
  print("Loading XTTS model")
 
178
  - iOS (Iphone/Ipad) devices may not experience voice due to autoplay being disabled on these devices by Vendor"""
179
  gr.Markdown(FOOTNOTE)
180
  demo.load(block=None, fn=generate_speech, inputs=[chatbot,chatbot_voice, gr.State(value=True)], outputs=[sentence, chatbot, audio_playback])
181
+ demo.queue().launch(debug=True,share=True)