salomonsky commited on
Commit
946827a
·
verified ·
1 Parent(s): a79a56f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -4,7 +4,7 @@ from gtts import gTTS
4
  import IPython.display as ipd
5
 
6
  client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
7
- system_prompt = "Te llamarás Xaman 2.0"
8
  system_prompt_sent = False
9
 
10
  def format_prompt(message, history):
@@ -55,13 +55,18 @@ def generate(
55
  yield output
56
 
57
  audio_file = text_to_speech(output)
58
- ipd.display(ipd.Audio(audio_file))
 
59
  return output
60
 
 
 
 
 
61
  chat_interface = gr.ChatInterface(
62
  fn=generate,
63
- chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=False, likeable=False, layout="vertical", height=700),
64
- concurrency_limit=9,
65
  theme="soft",
66
  retry_btn=None,
67
  undo_btn=None,
 
4
  import IPython.display as ipd
5
 
6
  client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
7
+ system_prompt = "Tu nombre es Xaman 3.0"
8
  system_prompt_sent = False
9
 
10
  def format_prompt(message, history):
 
55
  yield output
56
 
57
  audio_file = text_to_speech(output)
58
+ ipd.display(ipd.Audio(audio_file, autoplay=True))
59
+
60
  return output
61
 
62
+ additional_inputs = [
63
+ gr.Audio(autoplay=True)
64
+ ]
65
+
66
  chat_interface = gr.ChatInterface(
67
  fn=generate,
68
+ chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
69
+ additional_inputs=additional_inputs,
70
  theme="soft",
71
  retry_btn=None,
72
  undo_btn=None,