Spaces:
Sleeping
Sleeping
t-shooting poor performance
Browse files- src/app.py +7 -0
src/app.py
CHANGED
|
@@ -210,6 +210,7 @@ print("Settings configured")
|
|
| 210 |
print("\nCreating symptom index...")
|
| 211 |
symptom_index = create_symptom_index()
|
| 212 |
print("Index created successfully")
|
|
|
|
| 213 |
|
| 214 |
# --- System prompt ---
|
| 215 |
SYSTEM_PROMPT = """
|
|
@@ -433,6 +434,9 @@ with gr.Blocks(theme="default") as demo:
|
|
| 433 |
|
| 434 |
def enhanced_process_speech(audio_path, history, api_key=None, model_tier="small", temp=0.7):
|
| 435 |
"""Handle streaming speech processing and chat updates."""
|
|
|
|
|
|
|
|
|
|
| 436 |
if not audio_path:
|
| 437 |
return history
|
| 438 |
|
|
@@ -569,6 +573,9 @@ with gr.Blocks(theme="default") as demo:
|
|
| 569 |
|
| 570 |
def process_text_input(text, history):
|
| 571 |
"""Process text input with memory management."""
|
|
|
|
|
|
|
|
|
|
| 572 |
if not text:
|
| 573 |
return history, "" # Return tuple to clear input
|
| 574 |
|
|
|
|
| 210 |
print("\nCreating symptom index...")
|
| 211 |
symptom_index = create_symptom_index()
|
| 212 |
print("Index created successfully")
|
| 213 |
+
print("Loaded symptom_index:", type(symptom_index))
|
| 214 |
|
| 215 |
# --- System prompt ---
|
| 216 |
SYSTEM_PROMPT = """
|
|
|
|
| 434 |
|
| 435 |
def enhanced_process_speech(audio_path, history, api_key=None, model_tier="small", temp=0.7):
|
| 436 |
"""Handle streaming speech processing and chat updates."""
|
| 437 |
+
|
| 438 |
+
transcriber = get_asr_pipeline()
|
| 439 |
+
|
| 440 |
if not audio_path:
|
| 441 |
return history
|
| 442 |
|
|
|
|
| 573 |
|
| 574 |
def process_text_input(text, history):
|
| 575 |
"""Process text input with memory management."""
|
| 576 |
+
|
| 577 |
+
print("process_text_input received:", text)
|
| 578 |
+
|
| 579 |
if not text:
|
| 580 |
return history, "" # Return tuple to clear input
|
| 581 |
|