Spaces:
Sleeping
Sleeping
j-tobias
commited on
Commit
Β·
326a994
1
Parent(s):
e9daf29
small fixes
Browse files
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
|
92 |
|
93 |
chatbot = gr.Chatbot(
|
94 |
value=[{
|
95 |
'role':'System',
|
96 |
-
'content':'You are a
|
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"
|