UMESH266 commited on
Commit
d3c531a
·
1 Parent(s): a9e3a37

requirements updated

Browse files
Files changed (2) hide show
  1. app.py +2 -7
  2. requirements.txt +2 -1
app.py CHANGED
@@ -43,9 +43,7 @@ def response(input_text, docbot):
43
 
44
  if mode == "Doc-Bot" and st.session_state.HF_TOKEN != '':
45
  st.write("Doc-Bot implementation")
46
- # with open("artifacts/logit_model.pkl", "rb") as file:
47
- # logit_model = pickle.load(file)
48
-
49
  if 'doc_chat_hist' not in st.session_state:
50
  st.session_state.doc_chat_hist = dict()
51
 
@@ -65,7 +63,6 @@ if mode == "Doc-Bot" and st.session_state.HF_TOKEN != '':
65
 
66
  # Getting response and sentiment of response
67
  ans, senti = response(user_input, docbot=True)
68
- # st.button("Audio", on_click=play_speech(ans))
69
 
70
  # Chat history
71
  st.session_state.doc_chat_hist = chat_history(user_input, ans, senti)
@@ -97,11 +94,9 @@ elif mode == "Text" and st.session_state.HF_TOKEN != '':
97
  # Exiting the chat
98
  if 'exit' in user_input:
99
  st.write(salutation)
100
- play_speech(salutation)
101
 
102
  # Getting response and sentiment of response
103
  ans, senti = response(user_input, docbot=False)
104
- # st.button("Audio", on_click=play_speech(ans))
105
 
106
  # Chat history
107
  st.session_state.chathist = chat_history(user_input, ans, senti)
@@ -140,4 +135,4 @@ elif mode == "Voice" and st.session_state.HF_TOKEN != '':
140
  break
141
 
142
  #Getting response and sentiment of response
143
- response(user_input)# output = avatar.process_input(user_input)
 
43
 
44
  if mode == "Doc-Bot" and st.session_state.HF_TOKEN != '':
45
  st.write("Doc-Bot implementation")
46
+
 
 
47
  if 'doc_chat_hist' not in st.session_state:
48
  st.session_state.doc_chat_hist = dict()
49
 
 
63
 
64
  # Getting response and sentiment of response
65
  ans, senti = response(user_input, docbot=True)
 
66
 
67
  # Chat history
68
  st.session_state.doc_chat_hist = chat_history(user_input, ans, senti)
 
94
  # Exiting the chat
95
  if 'exit' in user_input:
96
  st.write(salutation)
 
97
 
98
  # Getting response and sentiment of response
99
  ans, senti = response(user_input, docbot=False)
 
100
 
101
  # Chat history
102
  st.session_state.chathist = chat_history(user_input, ans, senti)
 
135
  break
136
 
137
  #Getting response and sentiment of response
138
+ response(user_input)
requirements.txt CHANGED
@@ -12,4 +12,5 @@ pygame
12
  SpeechRecognition
13
  pyttsx3
14
  streamlit
15
- streamlit-option-menu
 
 
12
  SpeechRecognition
13
  pyttsx3
14
  streamlit
15
+ streamlit-option-menu
16
+ pyaudio