Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -454,11 +454,6 @@ def process_voice_input(audio_file):
|
|
454 |
return "No audio received. Please try recording again."
|
455 |
|
456 |
# Placeholder for speech recognition
|
457 |
-
# In a real implementation, you would use libraries like:
|
458 |
-
# - speech_recognition
|
459 |
-
# - whisper
|
460 |
-
# - Google Speech-to-Text API
|
461 |
-
|
462 |
return "Voice input received! (Speech recognition would be implemented here with libraries like Whisper or SpeechRecognition)"
|
463 |
|
464 |
def reset_conversation():
|
@@ -620,8 +615,7 @@ def create_gradio_interface():
|
|
620 |
|
621 |
with gr.Blocks(
|
622 |
css=custom_css,
|
623 |
-
title="π₯ Hybrid AI Assistant - Healthcare Billing Expert"
|
624 |
-
theme=gr.themes.Soft()
|
625 |
) as demo:
|
626 |
|
627 |
# Header Section
|
@@ -666,9 +660,8 @@ def create_gradio_interface():
|
|
666 |
examples=examples,
|
667 |
title="",
|
668 |
description="π¬ Start chatting! I can help with healthcare billing codes, general questions, and adapt to your emotional tone.",
|
669 |
-
|
670 |
-
|
671 |
-
undo_btn="β©οΈ Undo",
|
672 |
clear_btn="ποΈ Clear"
|
673 |
)
|
674 |
|
@@ -785,14 +778,4 @@ demo = create_gradio_interface()
|
|
785 |
# No need for manual demo.launch() in Hugging Face Spaces
|
786 |
if __name__ == "__main__":
|
787 |
# This block will be executed when running locally
|
788 |
-
|
789 |
-
demo.launch(
|
790 |
-
server_name="0.0.0.0",
|
791 |
-
server_port=7860,
|
792 |
-
share=True,
|
793 |
-
debug=True
|
794 |
-
)
|
795 |
-
|
796 |
-
# For Hugging Face Spaces deployment, export the demo
|
797 |
-
# Uncomment the line below when deploying to Hugging Face Spaces
|
798 |
-
# demo.queue().launch()
|
|
|
454 |
return "No audio received. Please try recording again."
|
455 |
|
456 |
# Placeholder for speech recognition
|
|
|
|
|
|
|
|
|
|
|
457 |
return "Voice input received! (Speech recognition would be implemented here with libraries like Whisper or SpeechRecognition)"
|
458 |
|
459 |
def reset_conversation():
|
|
|
615 |
|
616 |
with gr.Blocks(
|
617 |
css=custom_css,
|
618 |
+
title="π₯ Hybrid AI Assistant - Healthcare Billing Expert"
|
|
|
619 |
) as demo:
|
620 |
|
621 |
# Header Section
|
|
|
660 |
examples=examples,
|
661 |
title="",
|
662 |
description="π¬ Start chatting! I can help with healthcare billing codes, general questions, and adapt to your emotional tone.",
|
663 |
+
retry_btn="β» Retry",
|
664 |
+
undo_btn="βΊ Undo",
|
|
|
665 |
clear_btn="ποΈ Clear"
|
666 |
)
|
667 |
|
|
|
778 |
# No need for manual demo.launch() in Hugging Face Spaces
|
779 |
if __name__ == "__main__":
|
780 |
# This block will be executed when running locally
|
781 |
+
demo.launch(debug=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|