Tonic commited on
Commit
1b853a7
1 Parent(s): 86a924b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -369,12 +369,13 @@ def process_summary_with_stablemed(summary):
369
 
370
  def process_and_query(input_language=None, audio_input=None, image_input=None, text_input=None):
371
  try:
372
- # Initialize the conditional variables
373
  combined_text = ""
374
  image_description = ""
375
- markdown_output = "" # Initialize markdown_output
376
- image_text = "" # Initialize image_text
377
-
 
378
  # Debugging print statement
379
  print(f"Image Input Type: {type(image_input)}, Audio Input Type: {type(audio_input)}")
380
 
@@ -609,15 +610,14 @@ def create_interface():
609
  ["구강 헤르페스의 적절한 치료법은 무엇입니까?"],
610
  ["Je, ni matibabu gani sahihi kwa herpes ya buccal?"],
611
  ],inputs=[text_input])
612
- text_output = gr.Markdown(label="MultiMed") # Markdown component for text
613
- audio_output = gr.Audio(label="Audio Out", type="filepath")
614
-
615
 
616
  text_button = gr.Button("Use MultiMed")
617
  text_button.click(process_and_query, inputs=[input_language, audio_input, image_input, text_input], outputs=[text_output, audio_output])
618
 
619
  clear_button = gr.Button("Clear")
620
  clear_button.click(clear, inputs=[], outputs=[input_language, audio_input, image_input, text_output, audio_output])
 
 
621
 
622
  return iface
623
 
 
369
 
370
  def process_and_query(input_language=None, audio_input=None, image_input=None, text_input=None):
371
  try:
372
+
373
  combined_text = ""
374
  image_description = ""
375
+ markdown_output = ""
376
+ image_text = ""
377
+ translated_response = ""
378
+ audio_file_path = ""
379
  # Debugging print statement
380
  print(f"Image Input Type: {type(image_input)}, Audio Input Type: {type(audio_input)}")
381
 
 
610
  ["구강 헤르페스의 적절한 치료법은 무엇입니까?"],
611
  ["Je, ni matibabu gani sahihi kwa herpes ya buccal?"],
612
  ],inputs=[text_input])
 
 
 
613
 
614
  text_button = gr.Button("Use MultiMed")
615
  text_button.click(process_and_query, inputs=[input_language, audio_input, image_input, text_input], outputs=[text_output, audio_output])
616
 
617
  clear_button = gr.Button("Clear")
618
  clear_button.click(clear, inputs=[], outputs=[input_language, audio_input, image_input, text_output, audio_output])
619
+ text_output = gr.Markdown(label="MultiMed")
620
+ audio_output = gr.Audio(label="Audio Out", type="filepath")
621
 
622
  return iface
623