umsee
commited on
Commit
·
da1505f
1
Parent(s):
c83337f
changed upload type
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ parser = StrOutputParser()
|
|
| 10 |
|
| 11 |
def getting_prompt(txtmsg,spkmsg):
|
| 12 |
# print(spkmsg)
|
| 13 |
-
recog_text = pipe(spkmsg
|
| 14 |
messages = [
|
| 15 |
SystemMessage(content=txtmsg),
|
| 16 |
HumanMessage(content=recog_text['text']),
|
|
@@ -19,5 +19,5 @@ def getting_prompt(txtmsg,spkmsg):
|
|
| 19 |
response = chain.invoke(messages)
|
| 20 |
return response
|
| 21 |
|
| 22 |
-
demo = gr.Interface(getting_prompt,['text',gr.Audio(sources="microphone")],'text')
|
| 23 |
demo.launch(debug=True)
|
|
|
|
| 10 |
|
| 11 |
def getting_prompt(txtmsg,spkmsg):
|
| 12 |
# print(spkmsg)
|
| 13 |
+
recog_text = pipe(spkmsg)
|
| 14 |
messages = [
|
| 15 |
SystemMessage(content=txtmsg),
|
| 16 |
HumanMessage(content=recog_text['text']),
|
|
|
|
| 19 |
response = chain.invoke(messages)
|
| 20 |
return response
|
| 21 |
|
| 22 |
+
demo = gr.Interface(getting_prompt,['text',gr.Audio(sources="microphone",type='filepath')],'text')
|
| 23 |
demo.launch(debug=True)
|