ariankhalfani commited on
Commit
0c6da62
1 Parent(s): 1f18706

Update chatbot.py

Browse files
Files changed (1) hide show
  1. chatbot.py +1 -2
chatbot.py CHANGED
@@ -198,13 +198,12 @@ def get_aggregated_patient_history(patient_data, details):
198
  return history.strip()
199
 
200
  # Toggle visibility of input elements based on input type
201
- def toggle_visibility(input_type):
202
  if input_type == "Voice":
203
  return gr.update(visible=True), gr.update(visible=False)
204
  else:
205
  return gr.update(visible=False), gr.update(visible=True)
206
 
207
- # Cleanup response text
208
  def cleanup_response(response):
209
  # Extract only the part after "Answer:" and remove any trailing spaces
210
  answer_start = response.find("Answer:")
 
198
  return history.strip()
199
 
200
  # Toggle visibility of input elements based on input type
201
+ def toggle_input_visibility(input_type):
202
  if input_type == "Voice":
203
  return gr.update(visible=True), gr.update(visible=False)
204
  else:
205
  return gr.update(visible=False), gr.update(visible=True)
206
 
 
207
  def cleanup_response(response):
208
  # Extract only the part after "Answer:" and remove any trailing spaces
209
  answer_start = response.find("Answer:")