File size: 728 Bytes
cab263c 1581bbf cab263c 4affef3 f8dfb0f 2980190 cd60f99 42bce02 2980190 42b403c cd60f99 2980190 2271403 cd60f99 4affef3 1581bbf 4affef3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# version - ArticMonkey:19.03.24:1743
import psutil
import streamlit as st
from audio_processing.A2T import A2T
from llm.llm import LLM_chain
from streamlit_mic_recorder import mic_recorder
llmchain = LLM_chain()
def main():
mic = mic_recorder(start_prompt="Record",stop_prompt="Stop", just_once=True)
if mic is not None:
a2t = A2T(mic["bytes"])
text = a2t.predict()
st.write(text)
response = llmchain(entity=text, id=0)
st.write(response if response is not None else "Nothing")
del response
if __name__ == "__main__":
print('RAM memory % used:', psutil.virtual_memory()[2])
print('RAM Used (GB):', psutil.virtual_memory()[3]/1000000000)
main() |