lmzjms commited on
Commit
7b9b80c
·
1 Parent(s): d614f07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -10
app.py CHANGED
@@ -190,6 +190,7 @@ class ConversationBot:
190
  def clear_button(self):
191
  return gr.Button.update(visible=False)
192
  def init_agent(self, openai_api_key):
 
193
  self.llm = OpenAI(temperature=0, openai_api_key=openai_api_key)
194
  self.agent = initialize_agent(
195
  self.tools,
@@ -204,20 +205,20 @@ class ConversationBot:
204
 
205
 
206
  if __name__ == '__main__':
207
- bot = ConversationBot({'ImageCaptioning': 'cuda:0',
208
  #'T2A': 'cuda:0',
209
  #'I2A': 'cuda:0',
210
  'TTS': 'cpu',
211
- 'T2S': 'cpu',
212
- 'ASR': 'cuda:0',
213
- 'A2T': 'cpu',
214
  #'Inpaint': 'cuda:0',
215
- 'SoundDetection': 'cpu',
216
- 'Binaural': 'cuda:0',
217
- 'SoundExtraction': 'cuda:0',
218
- 'TargetSoundDetection': 'cuda:0',
219
- 'Speech_Enh_SC': 'cuda:0',
220
- 'Speech_SS': 'cuda:0'
221
  })
222
  with gr.Blocks(css="#chatbot {overflow:auto; height:500px;}") as demo:
223
  gr.Markdown(_DESCRIPTION)
 
190
  def clear_button(self):
191
  return gr.Button.update(visible=False)
192
  def init_agent(self, openai_api_key):
193
+ os.system(nvidia-smi)
194
  self.llm = OpenAI(temperature=0, openai_api_key=openai_api_key)
195
  self.agent = initialize_agent(
196
  self.tools,
 
205
 
206
 
207
  if __name__ == '__main__':
208
+ bot = ConversationBot({#'ImageCaptioning': 'cuda:0',
209
  #'T2A': 'cuda:0',
210
  #'I2A': 'cuda:0',
211
  'TTS': 'cpu',
212
+ #'T2S': 'cpu',
213
+ #'ASR': 'cuda:0',
214
+ #'A2T': 'cpu',
215
  #'Inpaint': 'cuda:0',
216
+ #'SoundDetection': 'cpu',
217
+ #'Binaural': 'cuda:0',
218
+ #'SoundExtraction': 'cuda:0',
219
+ #'TargetSoundDetection': 'cuda:0',
220
+ #'Speech_Enh_SC': 'cuda:0',
221
+ #'Speech_SS': 'cuda:0'
222
  })
223
  with gr.Blocks(css="#chatbot {overflow:auto; height:500px;}") as demo:
224
  gr.Markdown(_DESCRIPTION)