ALVHB95 commited on
Commit
4e51bc9
1 Parent(s): c7c56dc
Files changed (2) hide show
  1. app.py +2 -8
  2. requirements.txt +2 -1
app.py CHANGED
@@ -139,14 +139,8 @@ def chat_interface(question, audio_input=None, history=None):
139
  return transcriber({"sampling_rate": sr, "raw": y})["text"]
140
 
141
  # Transcribe the audio input
142
- transcribed_text = transcribe(audio_input)
143
-
144
- # Call the chatbot API with the transcribed text
145
- client = Client("https://ysharma-explore-llamav2-with-tgi.hf.space/")
146
- response = client.predict(
147
- transcribed_text,
148
- api_name="/chat"
149
- )
150
 
151
  return response
152
 
 
139
  return transcriber({"sampling_rate": sr, "raw": y})["text"]
140
 
141
  # Transcribe the audio input
142
+ question = transcribe(audio_input)
143
+
 
 
 
 
 
 
144
 
145
  return response
146
 
requirements.txt CHANGED
@@ -9,4 +9,5 @@ chromadb
9
  gradio
10
  beautifulsoup4
11
  tensorflow
12
- soundfile
 
 
9
  gradio
10
  beautifulsoup4
11
  tensorflow
12
+ soundfile
13
+ numpy