Spaces:
Sleeping
Sleeping
Commit ·
33c6f10
1
Parent(s): 48bf45d
Update app.py
Browse files15 unmodified lines1617181920212214 unmodified lines37383940414214 unmodified lines57585960616215 unmodified linespipe=pipeline('text2text-generation', model=model, tokenizer=tokenizer)greetings=["Hello! My name is MineAI, A specially trained LLM here to assist you on your Mining Related Queries.","How may I help you?"]14 unmodified linesfor gr in greetings:with st.chat_message("assistant"):st.markdown(gr)st.session_state.messages.append({'role':'assistant',14 unmodified lineswith st.chat_message("assistant"):st.markdown(response)st.session_state.messages.append({'role':'assistant',15 unmodified lines1617181920212214 unmodified lines3738394041424344454614 unmodified lines6162636465666768697015 unmodified linespipe=pipeline('text2text-generation', model=model, tokenizer=tokenizer)sound_file = BytesIO()greetings=["Hello! My name is MineAI, A specially trained LLM here to assist you on your Mining Related Queries.","How may I help you?"]14 unmodified linesfor gr in greetings:with st.chat_message("assistant"):st.markdown(gr)tts=gTTS(gr)tts.write_to_fp(sound_file)st.audio(sound_file)st.session_state.messages.append({'role':'assistant',14 unmodified lineswith st.chat_message("assistant"):st.markdown(response)tts=gTTS(response)tts.write_to_fp(sound_file)st.audio(sound_file)st.session_state.messages.append({'role':'assistant',
app.py+9-1