Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -648,7 +648,7 @@ def transcribe_audio(
|
|
| 648 |
raw_output += f"📤 Output: {token_count} tokens | ⏱️ Time: {generation_time:.2f}s\n"
|
| 649 |
raw_output += f"---\n"
|
| 650 |
# Format raw text for better readability: add newline after each dict (},)
|
| 651 |
-
formatted_raw_text = result['raw_text'].replace('},', '},\n')
|
| 652 |
raw_output += formatted_raw_text
|
| 653 |
|
| 654 |
# Debug: print raw output to console
|
|
@@ -877,7 +877,7 @@ def transcribe_audio(
|
|
| 877 |
"""
|
| 878 |
|
| 879 |
# Final yield with complete results
|
| 880 |
-
yield
|
| 881 |
|
| 882 |
except Exception as e:
|
| 883 |
print(f"Error during transcription: {e}")
|
|
|
|
| 648 |
raw_output += f"📤 Output: {token_count} tokens | ⏱️ Time: {generation_time:.2f}s\n"
|
| 649 |
raw_output += f"---\n"
|
| 650 |
# Format raw text for better readability: add newline after each dict (},)
|
| 651 |
+
formatted_raw_text = convert_to_traditional(result['raw_text'].replace('},', '},\n'))
|
| 652 |
raw_output += formatted_raw_text
|
| 653 |
|
| 654 |
# Debug: print raw output to console
|
|
|
|
| 877 |
"""
|
| 878 |
|
| 879 |
# Final yield with complete results
|
| 880 |
+
yield raw_output, audio_segments_html
|
| 881 |
|
| 882 |
except Exception as e:
|
| 883 |
print(f"Error during transcription: {e}")
|