Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,11 @@ import psutil
|
|
4 |
|
5 |
import streamlit as st
|
6 |
from audio2text.a2t import A2T
|
|
|
7 |
from streamlit_mic_recorder import mic_recorder
|
8 |
|
|
|
|
|
9 |
def main():
|
10 |
mic = mic_recorder(start_prompt="Record",stop_prompt="Stop", just_once=True)
|
11 |
|
@@ -13,6 +16,8 @@ def main():
|
|
13 |
a2t = A2T(mic["bytes"])
|
14 |
text = a2t.predict()
|
15 |
st.write(text)
|
|
|
|
|
16 |
|
17 |
|
18 |
if __name__ == "__main__":
|
|
|
4 |
|
5 |
import streamlit as st
|
6 |
from audio2text.a2t import A2T
|
7 |
+
from llm.llm import LLM_chain
|
8 |
from streamlit_mic_recorder import mic_recorder
|
9 |
|
10 |
+
llmchain = LLM_chain()
|
11 |
+
|
12 |
def main():
|
13 |
mic = mic_recorder(start_prompt="Record",stop_prompt="Stop", just_once=True)
|
14 |
|
|
|
16 |
a2t = A2T(mic["bytes"])
|
17 |
text = a2t.predict()
|
18 |
st.write(text)
|
19 |
+
response = llmchain(entity=text, id=0)
|
20 |
+
st.write(response if response is not None else "Nothing")
|
21 |
|
22 |
|
23 |
if __name__ == "__main__":
|