j-tobias commited on
Commit
326a994
Β·
1 Parent(s): e9daf29

small fixes

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -22,6 +22,9 @@ client = InferenceClient(
22
  "meta-llama/Meta-Llama-3-8B-Instruct",
23
  token=hf_token)
24
 
 
 
 
25
 
26
  def chat(audio, chat:list, asr_model:str):
27
  if asr_model == "openai/whisper-large-v2":
@@ -88,12 +91,12 @@ with gr.Blocks() as app:
88
  gr.Markdown("Welcome to VoiceBot πŸ‘‹, here is how it works")
89
  gr.Markdown("This Bot can only be interacted with through your voice. Press record and say something, after stopping the recoding your audio will be processed directly. You have the option to choose between different models. The model you choose influences the Bot's perfomance to understand what you have said. A better perfomance also comes with longer waiting time. πŸ˜•")
90
  gr.Markdown("Have fun playing arround πŸŽ‰")
91
- gr.Markdown("If you have any wishes for models or and idea, feel free to let me know πŸ™Œ")
92
 
93
  chatbot = gr.Chatbot(
94
  value=[{
95
  'role':'System',
96
- 'content':'You are a helpfull assitant for an Audio based Chatbot. You are helping Users to order their notes and thoughts.'
97
  }],
98
  bubble_full_width=False,
99
  type="messages"
 
22
  "meta-llama/Meta-Llama-3-8B-Instruct",
23
  token=hf_token)
24
 
25
+ model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en")
26
+ processor = WhisperProcessor.from_pretrained("openai/whisper-tiny.en")
27
+
28
 
29
  def chat(audio, chat:list, asr_model:str):
30
  if asr_model == "openai/whisper-large-v2":
 
91
  gr.Markdown("Welcome to VoiceBot πŸ‘‹, here is how it works")
92
  gr.Markdown("This Bot can only be interacted with through your voice. Press record and say something, after stopping the recoding your audio will be processed directly. You have the option to choose between different models. The model you choose influences the Bot's perfomance to understand what you have said. A better perfomance also comes with longer waiting time. πŸ˜•")
93
  gr.Markdown("Have fun playing arround πŸŽ‰")
94
+ gr.Markdown("If you have any wishes for models or a general idea, feel free to let me know πŸ™Œ")
95
 
96
  chatbot = gr.Chatbot(
97
  value=[{
98
  'role':'System',
99
+ 'content':'You are a funny assitant for an Audio based Chatbot. You are having a great time with the user, just playing arround.'
100
  }],
101
  bubble_full_width=False,
102
  type="messages"